allow clicking the message failed label

This commit is contained in:
tibbi 2021-01-02 10:25:54 +01:00
parent c3826dc9f2
commit a100ddb290
3 changed files with 22 additions and 9 deletions

View file

@ -224,8 +224,13 @@ class ThreadActivity : SimpleActivity() {
runOnUiThread {
val currAdapter = thread_messages_list.adapter
if (currAdapter == null) {
val adapter = ThreadAdapter(this, threadItems, thread_messages_list, thread_messages_fastscroller) {}
thread_messages_list.adapter = adapter
ThreadAdapter(this, threadItems, thread_messages_list, thread_messages_fastscroller) {
(it as? ThreadError)?.apply {
thread_type_message.setText(it.messageText)
}
}.apply {
thread_messages_list.adapter = this
}
} else {
(currAdapter as ThreadAdapter).updateMessages(threadItems)
}
@ -517,7 +522,7 @@ class ThreadActivity : SimpleActivity() {
items.add(message)
if (message.type == Telephony.Sms.MESSAGE_TYPE_FAILED) {
items.add(ThreadError(message.id))
items.add(ThreadError(message.id, message.body))
}
if (message.type == Telephony.Sms.MESSAGE_TYPE_OUTBOX) {