stream-chat-android icon indicating copy to clipboard operation
stream-chat-android copied to clipboard

MessageTheme.quotedTextStyle has no effect

Open zeroarst opened this issue 1 year ago • 1 comments

Describe the bug A clear and concise description of what the bug is.

SDK version

  • 6.4.0

To Reproduce Set the quoteTextStyle as below:


 ChatTheme(
        ownMessageTheme = MessageTheme.defaultOwnTheme().let { theme ->
            theme.copy(
                backgroundColor = Color(0xff343F93),
                textStyle = theme.textStyle.copy(
                    color = Color.Red
                ),
                quotedBackgroundColor = Color.White,
                quotedTextStyle = theme.quotedTextStyle.copy(
                    color = Color.Green // This has no effect.
                ),
            )
        },
    ) {
        // Stream components.
    }
)

Does not apply the color to quoted text. With above example, the quoted text should show green text color. image

I look at the source code, I cannot find quotedTextStyle is used anywhere. Checked QuotedMessage, QuotedMessageContent, QuotedMessageText.

image

Expected behavior Quoted text color is changed.

Device:

  • Vendor and model: Pixel 3a
  • Android version: 14

zeroarst avatar Jul 01 '24 01:07 zeroarst

Hey @zeroarst thanks for the report, indeed its has no effect. We will fix this in the next release.

aleksandar-apostolov avatar Jul 01 '24 11:07 aleksandar-apostolov

I tried the latest version (6.4.4) and the issue still persists. ChatTheme.ownMessageTheme.quotedTextStyle is correctly passed to the Text compose, but the color seems to be ovewritten by styledText: AnnotatedString color. As you can see from below's screenhot. style has green color; styledText has a red color SpanStyle; Stream Chat Bug - Invalid Quoted Message Color

zeroarst avatar Aug 15 '24 03:08 zeroarst

Hey @zeroarst,

Thank you letting us know. We'll address this issue asap.

kanat avatar Aug 26 '24 18:08 kanat

Hi @zeroarst,

This PR should fix the problem. It will be available with the next upcoming release.

kanat avatar Aug 26 '24 19:08 kanat

Fixed in v6.5.0

kanat avatar Sep 05 '24 13:09 kanat