* Add `formattedBody` to `TimelineItemTextBasedContent`.
This is pre-computed when timeline events are being mapped from the Rust SDK.
* Update `HtmlConverterProvider` styles.
* Improve `MentionSpan` to add missing `@` or `#` if needed
* Replace `HtmlDocument` with the `TextView` based component
* Improve extra padding calculation for timestamp by rounding the float offset result instead of truncating it.
* Remove composer line height workaround
* Use `ElementRichTextEditorStyle` instead of `RichTextEditorDefaults` for the theming
* Use slightly different styles for composer and messages (top/bottom line height discrepancies, mostly).
* Add `formattedBody` to notice and emote events.
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
* Open room member avatar in viewer.
The `MediaViewer` was extracted to its own library module.
* Update screenshots
* Restore KSP processor in `:libraries:mediaviewer:api`, this should generate Showkase components again.
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
## Type of change
- [x] Feature
- [ ] Bugfix
- [ ] Technical
- [ ] Other :
## Content
This PR consists of several macro-blocks separated by path/package:
- `messages.impl.mediaplayer` : Global (room-wide) media player, now used only for voice messages but could be used for all media within EX in the future. It is backed by media3's exoplayer. Currently not unit-tested because mocking exoplayer is not trivial.
- `messages.impl.voicemessages.play` : Business logic of a timeline voice message. This is all the logic that manages the voice message bubble.
- `messages.impl.timeline.model` & `messages.impl.timeline.factories`: Timeline code that takes care of creating the `content` object for voice messages.
- `messages.impl.timeline.components` : The actual View composable that shows the UI inside a voice message bubble.
All the rest is just small related changes that must be done here and there in existing code.
From a high level perspective this is how it works:
- Voice messages are unlike other message bubbles because they carry state (i.e. playing, downloading...) so they have a Presenter managing this state.
- Media content (i.e. the ogg file) of a voice message is downloaded from the rust SDK on first play then stored in a voice messages cache (see the `VoiceMessageCache` class, it is just a subdirectory in the app's cacheDir which is indexed by the matrix content uri). All further play attempts are done from the cache without hitting the rust SDK anymore.
- Playback of the ogg file is handled with the `VoiceMessagePlayer` class which is basically a "view" of the global `MediaPlayer` that allow the voice message to only see the media player state belonging to its media content.
- Drawing of the waveform is done with an OSS library wrapped in the `WaveformProgressIndicator` composable.
Known issues:
- The waveform has no position slider.
- The waveform (and together with it the whole message bubble) is taller than the actual Figma design.
- Swipe to reply for voice messages is disabled to avoid conflict with the audio scrubbing gesture (to reply to a voice message you have to use the long press menu).
- The loading indicator is always shown (there is no delay).
- Voice messages don't stop playing when redacted.
## Motivation and context
https://github.com/vector-im/element-meta/issues/2083
## Screenshots / GIFs
Provided by Screenshot tests in the PR itself.
* Integrate Element Call with widget API.
- Add `appconfig` module and extract constants that can be overridden in forks there.
- Add an Element Call feature flag, disabled by default.
- Refactor the whole `ElementCallActivity`, move most logic out of it.
- Integrate with the Rust Widget Driver API (note the Rust SDK version used in this PR lacks some needed changes to make the calls actually work).
- Handle calls differently based on `CallType`.
- Add UI to create/join a call.
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
* Handle poll events from the sdk
* Render started poll event in the timeline
* Create poll module
* Check poll kind before revealing the results
* Check if user has voted before revealing the results
* Add active poll previews
* Minor cleanup
* Update todos
* Fix CI
* Remove hardcoded string
* Update preview
* changelog file
* Update screenshots
* Use CommonPlurals
* Set poll root view as selectableGroup
* Improve poll result rendering
* Update screenshots
* Add missing showkase processor
* Update screenshots
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
* Add `PickerLauncher` wrapper for media/file pickers.
* Add FileProvider path, handle Camera picker and add NoOp implementation to fix tests.
* Move media pickers to their own module.
* Add missing media pickers
* Add feature flag and some extra tests
* Update AGP to 8.0.0.
* Set JAVA_HOME to JDK17
* Update lint version.
* Use right JDK for dependency analysis, replace deprecated env var.
* Upgrade to Gradle 8.1.
* Remove `@Supress(DSL_SCOPE_VIOLATION)` as it's no longer needed.
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>