diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/BoostSetCompose.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/BoostSetCompose.kt index 7f28820d6..98f613684 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/BoostSetCompose.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/BoostSetCompose.kt @@ -47,7 +47,7 @@ fun BoostSetCompose(boostSetCard: BoostSetCard, isInnerNote: Boolean = false, ro val noteEvent = note?.event var popupExpanded by remember { mutableStateOf(false) } - if (note?.event == null) { + if (note == null) { BlankNote(Modifier, isInnerNote) } else { var isNew by remember { mutableStateOf(false) } @@ -55,9 +55,7 @@ fun BoostSetCompose(boostSetCard: BoostSetCard, isInnerNote: Boolean = false, ro LaunchedEffect(key1 = boostSetCard) { isNew = boostSetCard.createdAt > NotificationCache.load(routeForLastRead, context) - val createdAt = note.event?.createdAt - if (createdAt != null) - NotificationCache.markAsRead(routeForLastRead, boostSetCard.createdAt, context) + NotificationCache.markAsRead(routeForLastRead, boostSetCard.createdAt, context) } var backgroundColor = if (isNew) { diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/LikeSetCompose.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/LikeSetCompose.kt index b5f2df08c..ac9f329f2 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/LikeSetCompose.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/LikeSetCompose.kt @@ -55,9 +55,7 @@ fun LikeSetCompose(likeSetCard: LikeSetCard, modifier: Modifier = Modifier, isIn LaunchedEffect(key1 = likeSetCard) { isNew = likeSetCard.createdAt > NotificationCache.load(routeForLastRead, context) - val createdAt = note.event?.createdAt - if (createdAt != null) - NotificationCache.markAsRead(routeForLastRead, likeSetCard.createdAt, context) + NotificationCache.markAsRead(routeForLastRead, likeSetCard.createdAt, context) } var backgroundColor = if (isNew) { diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ZapSetCompose.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ZapSetCompose.kt index e17f706a6..7cad35716 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ZapSetCompose.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ZapSetCompose.kt @@ -55,9 +55,7 @@ fun ZapSetCompose(zapSetCard: ZapSetCard, modifier: Modifier = Modifier, isInner LaunchedEffect(key1 = zapSetCard) { isNew = zapSetCard.createdAt > NotificationCache.load(routeForLastRead, context) - val createdAt = note.event?.createdAt - if (createdAt != null) - NotificationCache.markAsRead(routeForLastRead, zapSetCard.createdAt, context) + NotificationCache.markAsRead(routeForLastRead, zapSetCard.createdAt, context) } var backgroundColor = if (isNew) {