Skip to content

Commit

Permalink
Update widget after sending message
Browse files Browse the repository at this point in the history
  • Loading branch information
moezbhatti committed Nov 9, 2019
1 parent c1e2ef0 commit e720ee9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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

}

0 comments on commit e720ee9

Please sign in to comment.