mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 11:48:24 +00:00
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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user