Runs bottom's new notification refresher in the IO thread

This commit is contained in:
Vitor Pamplona
2023-06-02 21:27:11 -04:00
parent 6191ef9a6b
commit e9fd47a536
@@ -1,6 +1,7 @@
package com.vitorpamplona.amethyst.ui.navigation
import android.graphics.Rect
import android.os.Looper
import android.view.ViewTreeObserver
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
@@ -168,7 +169,9 @@ fun WatchPossibleNotificationChanges(
LaunchedEffect(Unit) {
launch(Dispatchers.IO) {
LocalCache.live.newEventBundles.collect {
onChange(route.hasNewItems(account, notif, it))
launch(Dispatchers.IO) {
onChange(route.hasNewItems(account, notif, it))
}
}
}
}