fix: also fade reply previews together with the parent NoteCompose

Restores ReplyNoteComposition's parentBackgroundColor parameter (reverting
part of the previous commit). With calculateBackgroundColor now returning
the parent State directly when routeForLastRead is null, every inner
NoteCompose call site (replies, reposts, reactions, reports, approvals,
attestations, multi-set / message-set notification cards, and rich-text
nostr:event/nostr:note quotes) shares the level-0 bgColor State and fades
in lockstep with the outer note.
This commit is contained in:
Claude
2026-05-16 19:07:26 +00:00
parent 523b0616cf
commit 19309c4587
3 changed files with 4 additions and 2 deletions
@@ -1496,6 +1496,7 @@ fun getGradient(backgroundColor: MutableState<Color>): Brush =
@Composable
fun ReplyNoteComposition(
replyingDirectlyTo: Note,
backgroundColor: MutableState<Color>,
accountViewModel: AccountViewModel,
nav: INav,
) {
@@ -1506,6 +1507,7 @@ fun ReplyNoteComposition(
unPackReply = ReplyRenderType.NONE,
makeItShort = true,
quotesLeft = 0,
parentBackgroundColor = backgroundColor,
accountViewModel = accountViewModel,
nav = nav,
)
@@ -109,7 +109,7 @@ fun RenderTextEvent(
if (replyingDirectlyTo != null && canShowReply) {
when (unPackReply) {
ReplyRenderType.FULL -> {
ReplyNoteComposition(replyingDirectlyTo, accountViewModel, nav)
ReplyNoteComposition(replyingDirectlyTo, backgroundColor, accountViewModel, nav)
Spacer(modifier = StdVertSpacer)
}
@@ -87,7 +87,7 @@ fun RenderZapPoll(
}
}
if (replyingDirectlyTo != null) {
ReplyNoteComposition(replyingDirectlyTo, accountViewModel, nav)
ReplyNoteComposition(replyingDirectlyTo, backgroundColor, accountViewModel, nav)
Spacer(modifier = StdVertSpacer)
}
}