Skip to content

Commit

Permalink
#1488 - Mark incoming blocked messages as read
Browse files Browse the repository at this point in the history
  • Loading branch information
moezbhatti committed Sep 9, 2019
1 parent 4c9130e commit 021fab5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion domain/src/main/java/com/moez/QKSMS/interactor/ReceiveMms.kt
Expand Up @@ -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
}
Expand Down
5 changes: 4 additions & 1 deletion domain/src/main/java/com/moez/QKSMS/interactor/ReceiveSms.kt
Expand Up @@ -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
}
Expand Down

0 comments on commit 021fab5

Please sign in to comment.