From f64686619233a142a8ba1fe6b6acd35f9266d297 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Wed, 21 Aug 2024 09:20:20 -0400 Subject: [PATCH] moves markasread from io to default --- .../amethyst/ui/screen/loggedIn/AccountViewModel.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt index dcf0789c7..bf837c119 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt @@ -44,6 +44,7 @@ import com.vitorpamplona.amethyst.model.AccountState import com.vitorpamplona.amethyst.model.AddressableNote import com.vitorpamplona.amethyst.model.Channel import com.vitorpamplona.amethyst.model.LocalCache +import com.vitorpamplona.amethyst.model.LocalCache.notes import com.vitorpamplona.amethyst.model.Note import com.vitorpamplona.amethyst.model.UrlCachedPreviewer import com.vitorpamplona.amethyst.model.User @@ -1132,7 +1133,7 @@ class AccountViewModel( val onIsNew = createdAt > lastTime if (onIsNew) { - viewModelScope.launch(Dispatchers.IO) { + viewModelScope.launch(Dispatchers.Default) { if (account.markAsRead(routeForLastRead, createdAt)) { refreshMarkAsReadObservers() }