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 f56c0137e5..fe6699eb94 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 @@ -1484,14 +1484,22 @@ fun RenderRepost( } } -fun getGradient(backgroundColor: MutableState): Brush = - Brush.verticalGradient( +@Composable +fun getGradient(backgroundColor: MutableState): Brush { + val solid = + if (backgroundColor.value.alpha == 0f) { + MaterialTheme.colorScheme.background + } else { + backgroundColor.value.copy(alpha = 1f) + } + return Brush.verticalGradient( colors = listOf( - backgroundColor.value.copy(alpha = 0f), - backgroundColor.value.copy(alpha = 1f), + solid.copy(alpha = 0f), + solid, ), ) +} @Composable fun ReplyNoteComposition(