From bd8e9da966ee2fec76b15594dfdb7b39a6ecf9ce Mon Sep 17 00:00:00 2001 From: maxmoney21m Date: Sat, 4 Mar 2023 15:03:11 +0800 Subject: [PATCH] Swap LaunchedEffect key for clarity --- .../vitorpamplona/amethyst/ui/screen/ChatroomListFeedView.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/screen/ChatroomListFeedView.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/screen/ChatroomListFeedView.kt index 46391ad374..f056afb5be 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/screen/ChatroomListFeedView.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/screen/ChatroomListFeedView.kt @@ -99,8 +99,8 @@ private fun FeedLoaded( val notificationCache = notificationCacheState.value ?: return val context = LocalContext.current.applicationContext - if (markAsRead.value) { - LaunchedEffect(key1 = notificationCache) { + LaunchedEffect(key1 = markAsRead.value) { + if (markAsRead.value) { for (note in state.feed.value) { note.event?.let { var route = ""