From e9fd47a536f54ceef309020f1ef5513a496c668d Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 2 Jun 2023 21:27:11 -0400 Subject: [PATCH] Runs bottom's new notification refresher in the IO thread --- .../com/vitorpamplona/amethyst/ui/navigation/AppBottomBar.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppBottomBar.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppBottomBar.kt index 4148fd738..7022220d1 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppBottomBar.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppBottomBar.kt @@ -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)) + } } } }