catching some exceptions
This commit is contained in:
parent
3b1ee82835
commit
de54a88b2d
|
@ -188,9 +188,12 @@ class ThreadActivity : SimpleActivity() {
|
||||||
it.phoneNumbers.contains(it.name)
|
it.phoneNumbers.contains(it.name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
if (participants.isNotEmpty() && messages.hashCode() == cachedMessagesCode && !hasParticipantWithoutName) {
|
if (participants.isNotEmpty() && messages.hashCode() == cachedMessagesCode && !hasParticipantWithoutName) {
|
||||||
return@ensureBackgroundThread
|
return@ensureBackgroundThread
|
||||||
}
|
}
|
||||||
|
} catch (ignored: Exception) {
|
||||||
|
}
|
||||||
|
|
||||||
setupParticipants()
|
setupParticipants()
|
||||||
|
|
||||||
|
|
|
@ -40,9 +40,12 @@ class SmsReceiver : BroadcastReceiver() {
|
||||||
val newMessageId = context.insertNewSMS(address, subject, body, date, read, threadId, type, subscriptionId)
|
val newMessageId = context.insertNewSMS(address, subject, body, date, read, threadId, type, subscriptionId)
|
||||||
|
|
||||||
val conversation = context.getConversations(threadId).firstOrNull() ?: return@ensureBackgroundThread
|
val conversation = context.getConversations(threadId).firstOrNull() ?: return@ensureBackgroundThread
|
||||||
|
try {
|
||||||
context.conversationsDB.insertOrUpdate(conversation)
|
context.conversationsDB.insertOrUpdate(conversation)
|
||||||
context.updateUnreadCountBadge(context.conversationsDB.getUnreadConversations())
|
} catch (ignored: Exception) {
|
||||||
|
}
|
||||||
|
|
||||||
|
context.updateUnreadCountBadge(context.conversationsDB.getUnreadConversations())
|
||||||
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()
|
||||||
|
|
Loading…
Reference in New Issue