#1488 - Mark incoming blocked messages as read

This commit is contained in:
moezbhatti
2019-09-08 21:58:26 -04:00
parent 4c9130e11a
commit 021fab57ca
2 changed files with 8 additions and 2 deletions
@@ -67,7 +67,10 @@ class ReceiveMms @Inject constructor(
}
when (action) {
BlockingClient.Action.BLOCK -> conversationRepo.markBlocked(message.threadId)
BlockingClient.Action.BLOCK -> {
messageRepo.markRead(message.threadId)
conversationRepo.markBlocked(message.threadId)
}
BlockingClient.Action.UNBLOCK -> conversationRepo.markUnblocked(message.threadId)
else -> Unit
}
@@ -67,7 +67,10 @@ class ReceiveSms @Inject constructor(
val message = messageRepo.insertReceivedSms(it.subId, address, body, time)
when (action) {
BlockingClient.Action.BLOCK -> conversationRepo.markBlocked(message.threadId)
BlockingClient.Action.BLOCK -> {
messageRepo.markRead(message.threadId)
conversationRepo.markBlocked(message.threadId)
}
BlockingClient.Action.UNBLOCK -> conversationRepo.markUnblocked(message.threadId)
else -> Unit
}