- Small edits.

This commit is contained in:
Juha Heinanen
2019-11-23 12:23:51 +02:00
parent 6a792bda34
commit 08ebb730ff
6 changed files with 4 additions and 8 deletions
@@ -46,7 +46,8 @@ class ChatListAdapter(private val cxt: Context, private var rows: ArrayList<Mess
cardAvatarView.visibility = View.GONE
textAvatarView.setBackgroundResource(R.drawable.person_image)
}
if (message.direction == R.drawable.arrow_down_green) {
if ((message.direction == R.drawable.arrow_down_green) ||
(message.direction == R.drawable.arrow_down_red)) {
layout.setBackgroundResource(R.drawable.message_in_bg)
} else {
layout.setBackgroundResource(R.drawable.message_out_bg)
@@ -126,7 +126,6 @@ class ContactActivity : AppCompatActivity() {
if (requestCode == READ_REQUEST_CODE && resultCode == Activity.RESULT_OK) {
resultData?.data?.also { uri ->
Log.d("Baresip", "Uri: $uri")
try {
val inputStream = baseContext.contentResolver.openInputStream(uri)
val avatarImage = BitmapFactory.decodeStream(inputStream)
@@ -972,7 +972,6 @@ class MainActivity : AppCompatActivity() {
File(BaresipService.filesPath).walk().forEach {
if (it.name.endsWith(".png")) files.add(it.name)
}
Log.d("Baresip", "Backing up files $files")
val backupFilePath = BaresipService.downloadsPath + "/baresip.bs"
val zipFilePath = BaresipService.filesPath + "/baresip.zip"
if (!Utils.zip(files, "baresip.zip")) {
@@ -1011,7 +1010,6 @@ class MainActivity : AppCompatActivity() {
return
}
Utils.deleteFile(File(zipFilePath))
Log.d("Baresip", "Showing restart dialog")
val restartDialog = AlertDialog.Builder(this)
restartDialog.setMessage(getString(R.string.restored))
restartDialog.setPositiveButton(getText(R.string.restart)) { dialog, _ ->
@@ -70,7 +70,6 @@ object Utils {
}
fun friendlyUri(uri: String, domain: String): String {
Log.d("Baresip", "Checking uri $uri and domain $domain")
var u = uri
if (uri.startsWith("<") && (uri.endsWith(">")))
u = uri.substring(1).substringBeforeLast(">")