Chat icon indicating copy to clipboard operation
Chat copied to clipboard

Add attributedText property to Message

Open singpolyma opened this issue 9 months ago • 3 comments

Instead of a styler which runs on every render, pre-style the text and store it styled so that it can be rendered that way.

singpolyma avatar Apr 09 '25 17:04 singpolyma

Hi @singpolyma, is the motivation to keep the API the same while improving performance? Or are you interested in changing the API too?

I.e. would you like to replace text: String with text: AttributedString and pass that directly from the client? Or would you still like to pass a String and just have the AttributedString cached on the Message instead of running the styler in each view?

matthewrfennell avatar Apr 09 '25 20:04 matthewrfennell

I would like to have both, yeah. Especially so edit can still work until/unless there is a rich text edit option

singpolyma avatar Apr 09 '25 20:04 singpolyma

prototype https://github.com/singpolyma/Chat/commit/c9803cc40354419d0742082ec1aba6e05ee8e61e

singpolyma avatar Jun 24 '25 19:06 singpolyma