mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-06-05 21:49:22 +02:00
catching some exceptions
This commit is contained in:
@@ -188,8 +188,11 @@ class ThreadActivity : SimpleActivity() {
|
||||
it.phoneNumbers.contains(it.name)
|
||||
}
|
||||
|
||||
if (participants.isNotEmpty() && messages.hashCode() == cachedMessagesCode && !hasParticipantWithoutName) {
|
||||
return@ensureBackgroundThread
|
||||
try {
|
||||
if (participants.isNotEmpty() && messages.hashCode() == cachedMessagesCode && !hasParticipantWithoutName) {
|
||||
return@ensureBackgroundThread
|
||||
}
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
|
||||
setupParticipants()
|
||||
|
@@ -40,9 +40,12 @@ class SmsReceiver : BroadcastReceiver() {
|
||||
val newMessageId = context.insertNewSMS(address, subject, body, date, read, threadId, type, subscriptionId)
|
||||
|
||||
val conversation = context.getConversations(threadId).firstOrNull() ?: return@ensureBackgroundThread
|
||||
context.conversationsDB.insertOrUpdate(conversation)
|
||||
context.updateUnreadCountBadge(context.conversationsDB.getUnreadConversations())
|
||||
try {
|
||||
context.conversationsDB.insertOrUpdate(conversation)
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
|
||||
context.updateUnreadCountBadge(context.conversationsDB.getUnreadConversations())
|
||||
val participant = SimpleContact(0, 0, address, "", arrayListOf(address), ArrayList(), ArrayList())
|
||||
val participants = arrayListOf(participant)
|
||||
val messageDate = (date / 1000).toInt()
|
||||
|
Reference in New Issue
Block a user