Merge branch 'SimpleMobileTools:master' into feature_attachments

This commit is contained in:
Naveen 2022-11-02 18:14:05 +05:30
commit d202c3b172
39 changed files with 264 additions and 137 deletions

View file

@ -224,7 +224,9 @@ class ThreadActivity : SimpleActivity() {
val data = resultData?.data
when (requestCode) {
CAPTURE_PHOTO_INTENT -> addAttachment(capturedImageUri!!)
CAPTURE_PHOTO_INTENT -> if (capturedImageUri != null) {
addAttachment(capturedImageUri!!)
}
CAPTURE_VIDEO_INTENT -> if (data != null) {
addAttachment(data)
}
@ -246,15 +248,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 {
@ -623,7 +616,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)
}
}
}