Marks as read regardless of note.event status.
This commit is contained in:
@@ -47,7 +47,7 @@ fun BoostSetCompose(boostSetCard: BoostSetCard, isInnerNote: Boolean = false, ro
|
|||||||
val noteEvent = note?.event
|
val noteEvent = note?.event
|
||||||
var popupExpanded by remember { mutableStateOf(false) }
|
var popupExpanded by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
if (note?.event == null) {
|
if (note == null) {
|
||||||
BlankNote(Modifier, isInnerNote)
|
BlankNote(Modifier, isInnerNote)
|
||||||
} else {
|
} else {
|
||||||
var isNew by remember { mutableStateOf<Boolean>(false) }
|
var isNew by remember { mutableStateOf<Boolean>(false) }
|
||||||
@@ -55,9 +55,7 @@ fun BoostSetCompose(boostSetCard: BoostSetCard, isInnerNote: Boolean = false, ro
|
|||||||
LaunchedEffect(key1 = boostSetCard) {
|
LaunchedEffect(key1 = boostSetCard) {
|
||||||
isNew = boostSetCard.createdAt > NotificationCache.load(routeForLastRead, context)
|
isNew = boostSetCard.createdAt > NotificationCache.load(routeForLastRead, context)
|
||||||
|
|
||||||
val createdAt = note.event?.createdAt
|
NotificationCache.markAsRead(routeForLastRead, boostSetCard.createdAt, context)
|
||||||
if (createdAt != null)
|
|
||||||
NotificationCache.markAsRead(routeForLastRead, boostSetCard.createdAt, context)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var backgroundColor = if (isNew) {
|
var backgroundColor = if (isNew) {
|
||||||
|
|||||||
@@ -55,9 +55,7 @@ fun LikeSetCompose(likeSetCard: LikeSetCard, modifier: Modifier = Modifier, isIn
|
|||||||
LaunchedEffect(key1 = likeSetCard) {
|
LaunchedEffect(key1 = likeSetCard) {
|
||||||
isNew = likeSetCard.createdAt > NotificationCache.load(routeForLastRead, context)
|
isNew = likeSetCard.createdAt > NotificationCache.load(routeForLastRead, context)
|
||||||
|
|
||||||
val createdAt = note.event?.createdAt
|
NotificationCache.markAsRead(routeForLastRead, likeSetCard.createdAt, context)
|
||||||
if (createdAt != null)
|
|
||||||
NotificationCache.markAsRead(routeForLastRead, likeSetCard.createdAt, context)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var backgroundColor = if (isNew) {
|
var backgroundColor = if (isNew) {
|
||||||
|
|||||||
@@ -55,9 +55,7 @@ fun ZapSetCompose(zapSetCard: ZapSetCard, modifier: Modifier = Modifier, isInner
|
|||||||
LaunchedEffect(key1 = zapSetCard) {
|
LaunchedEffect(key1 = zapSetCard) {
|
||||||
isNew = zapSetCard.createdAt > NotificationCache.load(routeForLastRead, context)
|
isNew = zapSetCard.createdAt > NotificationCache.load(routeForLastRead, context)
|
||||||
|
|
||||||
val createdAt = note.event?.createdAt
|
NotificationCache.markAsRead(routeForLastRead, zapSetCard.createdAt, context)
|
||||||
if (createdAt != null)
|
|
||||||
NotificationCache.markAsRead(routeForLastRead, zapSetCard.createdAt, context)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var backgroundColor = if (isNew) {
|
var backgroundColor = if (isNew) {
|
||||||
|
|||||||
Reference in New Issue
Block a user