Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e720ee95 authored by moezbhatti's avatar moezbhatti
Browse files

Update widget after sending message

parent c1e2ef0f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -30,7 +30,8 @@ import javax.inject.Inject
class SendMessage @Inject constructor(
    private val context: Context,
    private val conversationRepo: ConversationRepository,
    private val messageRepo: MessageRepository
    private val messageRepo: MessageRepository,
    private val updateBadge: UpdateBadge
) : Interactor<SendMessage.Params>() {

    data class Params(
@@ -63,5 +64,6 @@ class SendMessage @Inject constructor(
            }
            .doOnNext { threadId -> conversationRepo.updateConversations(threadId) }
            .doOnNext { threadId -> conversationRepo.markUnarchived(threadId) }
            .flatMap { updateBadge.buildObservable(Unit) } // Update the widget

}
 No newline at end of file