Skip to content

Commit

Permalink
removeRedditEmptyCookie in io() (#4964)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/1198194956794324/1208180779425187/f

### Description
Fix potential ANR during reddit workaround

### Steps to test this PR
Repeat test in #4591
  • Loading branch information
aitorvs authored Aug 30, 2024
1 parent 137dc76 commit 3f2d47c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ class RedditBlockWorkaround @Inject constructor(
}
}
override fun onPause(owner: LifecycleOwner) {
removeRedditEmptyCookie()
owner.lifecycleScope.launch(dispatcherProvider.io()) {
removeRedditEmptyCookie()
}
}

private suspend fun addRedditEmptyCookie() {
Expand Down

0 comments on commit 3f2d47c

Please sign in to comment.