You've already forked element-x-android
mirror of
https://github.com/element-hq/element-x-android.git
synced 2026-10-23 18:49:00 +03:00
* Pass media captions as HTML to the media viewer `MediaInfo` and `GalleryInfo` carried the formatted caption as a `CharSequence`, which isn't a good fit for `Parcelable` classes. Some producers also passed the raw HTML body in that field, so the caption was rendered with its tags, and gallery messages didn't pass a formatted caption at all. Replace `formattedCaption` with `htmlCaption: String?` and convert it to styled text in `MediaViewerPresenter`, using the same `HtmlConverterProvider` as the timeline. The converted captions are cached by HTML so page data equality stays stable across list updates. * Pillify media captions in the media viewer Move the `TextPillificationHelper` interface to `:features:messages:api` so the media viewer can use it, keeping `DefaultTextPillificationHelper` in the impl module. The fake moves to `:features:messages:test`. `MediaViewerPresenter` now pillifies converted HTML captions before linkifying them, matching how captions are rendered in the timeline. * Rename `TextPillificationHelper` to `TextPillificator`, also fix copyright notice. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>