minor fixes and updates here and there
This commit is contained in:
parent
162b2fb499
commit
5f728c9321
4 changed files with 22 additions and 27 deletions
|
|
@ -215,7 +215,7 @@ class ThreadActivity : SimpleActivity() {
|
|||
super.onActivityResult(requestCode, resultCode, resultData)
|
||||
if (resultCode != Activity.RESULT_OK) return
|
||||
|
||||
if (requestCode == TAKE_PHOTO_INTENT) {
|
||||
if (requestCode == TAKE_PHOTO_INTENT && capturedImageUri != null) {
|
||||
addAttachment(capturedImageUri!!)
|
||||
} else if (requestCode == PICK_ATTACHMENT_INTENT && resultData != null && resultData.data != null) {
|
||||
addAttachment(resultData.data!!)
|
||||
|
|
@ -224,15 +224,6 @@ class ThreadActivity : SimpleActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun onHomePressed() {
|
||||
hideKeyboard()
|
||||
Intent(this, MainActivity::class.java).apply {
|
||||
addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||
startActivity(this)
|
||||
}
|
||||
finish()
|
||||
}
|
||||
|
||||
private fun setupCachedMessages(callback: () -> Unit) {
|
||||
ensureBackgroundThread {
|
||||
messages = try {
|
||||
|
|
@ -594,7 +585,11 @@ class ThreadActivity : SimpleActivity() {
|
|||
}
|
||||
|
||||
thread_select_sim_number.setTextColor(getProperTextColor().getContrastColor())
|
||||
thread_select_sim_number.text = (availableSIMCards[currentSIMCardIndex].id).toString()
|
||||
try {
|
||||
thread_select_sim_number.text = (availableSIMCards[currentSIMCardIndex].id).toString()
|
||||
} catch (e: Exception) {
|
||||
showErrorToast(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue