Last details on running on the main thread

This commit is contained in:
Vitor Pamplona
2025-08-08 17:20:13 -04:00
parent c8d2283d2d
commit 011c693aa0
@@ -195,14 +195,18 @@ class Amber : Application(), LifecycleObserver {
super.onResume(owner)
// activates the profile filter only when the app is in the foreground
profileSubscription.updateFilter()
applicationIOScope.launch {
profileSubscription.updateFilter()
}
}
override fun onPause(owner: LifecycleOwner) {
super.onPause(owner)
// closes the filter when in the background
profileSubscription.closeSub()
applicationIOScope.launch {
profileSubscription.closeSub()
}
}
})