Show long toast errors
This commit is contained in:
parent
2a7a017f57
commit
e6515436d9
1 changed files with 5 additions and 4 deletions
|
|
@ -847,6 +847,7 @@ class ThreadActivity : SimpleActivity() {
|
||||||
private fun sendMessage() {
|
private fun sendMessage() {
|
||||||
var msg = thread_type_message.value
|
var msg = thread_type_message.value
|
||||||
if (msg.isEmpty() && attachmentSelections.isEmpty()) {
|
if (msg.isEmpty() && attachmentSelections.isEmpty()) {
|
||||||
|
toast(R.string.unknown_error_occurred, length = Toast.LENGTH_LONG)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -878,9 +879,9 @@ class ThreadActivity : SimpleActivity() {
|
||||||
val mimeType = contentResolver.getType(selection.uri) ?: continue
|
val mimeType = contentResolver.getType(selection.uri) ?: continue
|
||||||
message.addMedia(byteArray, mimeType)
|
message.addMedia(byteArray, mimeType)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
showErrorToast(e)
|
showErrorToast(e, length = Toast.LENGTH_LONG)
|
||||||
} catch (e: Error) {
|
} catch (e: Error) {
|
||||||
toast(e.localizedMessage ?: getString(R.string.unknown_error_occurred))
|
toast(e.localizedMessage ?: getString(R.string.unknown_error_occurred), length = Toast.LENGTH_LONG)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -903,9 +904,9 @@ class ThreadActivity : SimpleActivity() {
|
||||||
refreshMessages()
|
refreshMessages()
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
showErrorToast(e)
|
showErrorToast(e, length = Toast.LENGTH_LONG)
|
||||||
} catch (e: Error) {
|
} catch (e: Error) {
|
||||||
toast(e.localizedMessage ?: getString(R.string.unknown_error_occurred))
|
toast(e.localizedMessage ?: getString(R.string.unknown_error_occurred), length = Toast.LENGTH_LONG)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue