minor fixes and updates here and there

This commit is contained in:
tibbi 2022-10-26 18:36:44 +02:00
parent 162b2fb499
commit 5f728c9321
4 changed files with 22 additions and 27 deletions

View file

@ -39,21 +39,21 @@ class DirectReplyReceiver : BroadcastReceiver() {
val transaction = Transaction(context, settings)
val message = com.klinker.android.send_message.Message(msg, address)
try {
val smsSentIntent = Intent(context, SmsStatusSentReceiver::class.java)
val deliveredIntent = Intent(context, SmsStatusDeliveredReceiver::class.java)
transaction.setExplicitBroadcastForSentSms(smsSentIntent)
transaction.setExplicitBroadcastForDeliveredSms(deliveredIntent)
transaction.sendNewMessage(message)
} catch (e: Exception) {
context.showErrorToast(e)
}
context.notificationManager.cancel(threadId.hashCode())
ensureBackgroundThread {
try {
val smsSentIntent = Intent(context, SmsStatusSentReceiver::class.java)
val deliveredIntent = Intent(context, SmsStatusDeliveredReceiver::class.java)
transaction.setExplicitBroadcastForSentSms(smsSentIntent)
transaction.setExplicitBroadcastForDeliveredSms(deliveredIntent)
transaction.sendNewMessage(message)
} catch (e: Exception) {
context.showErrorToast(e)
}
context.notificationManager.cancel(threadId.hashCode())
context.markThreadMessagesRead(threadId)
context.conversationsDB.markRead(threadId)
}