Skip to content

Commit

Permalink
Add usage of goAsync() in MarkReadReceiver and MarkSeenReceiver
Browse files Browse the repository at this point in the history
  • Loading branch information
moezbhatti committed Jun 21, 2018
1 parent 9b624d3 commit c455fd3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ class MarkReadReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
AndroidInjection.inject(this, context)

val pendingResult = goAsync()
val threadId = intent.getLongExtra("threadId", 0)
markRead.execute(listOf(threadId))
markRead.execute(listOf(threadId)) { pendingResult.finish() }
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ class MarkSeenReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
AndroidInjection.inject(this, context)

val pendingResult = goAsync()
val threadId = intent.getLongExtra("threadId", 0)
markSeen.execute(threadId)
markSeen.execute(threadId) { pendingResult.finish() }
}

}

0 comments on commit c455fd3

Please sign in to comment.