diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt index e33451c4c4..47c15460ca 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt @@ -490,9 +490,12 @@ fun calculateBackgroundColor( val defaultBackgroundColor = MaterialTheme.colorScheme.background val newItemColor = MaterialTheme.colorScheme.newItemBackgroundColor - // Only fade in/out the "new item" highlight for items that track read state. - // Inner notes (reposts/quotes) pass routeForLastRead = null and reuse the parent color directly, - // so the LaunchedEffect would just park a coroutine for 5s per item during scroll. + // Inner notes (reposts) pass routeForLastRead = null with the parent's bgColor state; + // share it directly so the inner highlight fades in lockstep with the outer. + if (routeForLastRead == null && parentBackgroundColor != null) { + return parentBackgroundColor + } + val isNew = remember(createdAt, routeForLastRead) { routeForLastRead != null && accountViewModel.loadAndMarkAsRead(routeForLastRead, createdAt) @@ -1493,7 +1496,6 @@ fun getGradient(backgroundColor: MutableState): Brush = @Composable fun ReplyNoteComposition( replyingDirectlyTo: Note, - backgroundColor: MutableState, accountViewModel: AccountViewModel, nav: INav, ) { @@ -1504,7 +1506,6 @@ fun ReplyNoteComposition( unPackReply = ReplyRenderType.NONE, makeItShort = true, quotesLeft = 0, - parentBackgroundColor = backgroundColor, accountViewModel = accountViewModel, nav = nav, ) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/Text.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/Text.kt index ce5eb75ba0..c8aaead89f 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/Text.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/Text.kt @@ -109,7 +109,7 @@ fun RenderTextEvent( if (replyingDirectlyTo != null && canShowReply) { when (unPackReply) { ReplyRenderType.FULL -> { - ReplyNoteComposition(replyingDirectlyTo, backgroundColor, accountViewModel, nav) + ReplyNoteComposition(replyingDirectlyTo, accountViewModel, nav) Spacer(modifier = StdVertSpacer) } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/ZapPoll.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/ZapPoll.kt index 48847aa61b..81bfb1b86f 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/ZapPoll.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/ZapPoll.kt @@ -87,7 +87,7 @@ fun RenderZapPoll( } } if (replyingDirectlyTo != null) { - ReplyNoteComposition(replyingDirectlyTo, backgroundColor, accountViewModel, nav) + ReplyNoteComposition(replyingDirectlyTo, accountViewModel, nav) Spacer(modifier = StdVertSpacer) } }