catch exceptions thrown at getting unread conversations
This commit is contained in:
parent
8eaafc1d3c
commit
5f11714e6f
1 changed files with 7 additions and 2 deletions
|
|
@ -47,11 +47,16 @@ class SmsReceiver : BroadcastReceiver() {
|
||||||
} catch (ignored: Exception) {
|
} catch (ignored: Exception) {
|
||||||
}
|
}
|
||||||
|
|
||||||
context.updateUnreadCountBadge(context.conversationsDB.getUnreadConversations())
|
try {
|
||||||
|
context.updateUnreadCountBadge(context.conversationsDB.getUnreadConversations())
|
||||||
|
} catch (ignored: Exception) {
|
||||||
|
}
|
||||||
|
|
||||||
val participant = SimpleContact(0, 0, address, "", arrayListOf(address), ArrayList(), ArrayList())
|
val participant = SimpleContact(0, 0, address, "", arrayListOf(address), ArrayList(), ArrayList())
|
||||||
val participants = arrayListOf(participant)
|
val participants = arrayListOf(participant)
|
||||||
val messageDate = (date / 1000).toInt()
|
val messageDate = (date / 1000).toInt()
|
||||||
val message = Message(newMessageId, body, type, status, participants, messageDate, false, threadId, false, null, address, "", subscriptionId)
|
val message =
|
||||||
|
Message(newMessageId, body, type, status, participants, messageDate, false, threadId, false, null, address, "", subscriptionId)
|
||||||
context.messagesDB.insertOrUpdate(message)
|
context.messagesDB.insertOrUpdate(message)
|
||||||
refreshMessages()
|
refreshMessages()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue