* Add support for slash commands
* Update screenshots
* Rename module `slash` to `slashcommands`
* Rename `SlashCommand` to `SlashCommandService`
* Introduce MsgType in order to send text message with a different msgtype value.
* Format file and add parameter names, add default values and cleanup
* Add isSupported parameter to filter out unsupported yet commands.
* Slash commands: disable suggestions if the feature is disabled.
* Fix sending shrug command.
* Add missing test on SuggestionsProcessor
* Add tests on MessageComposerPresenter about slash command.
* Fix import ordering
* Add missing tests on CommandExecutor
* Add missing tests in MarkdownTextEditorStateTest
* Slash commands: Improve code when sending message with prefix.
* Slash commands: Add support for /unflip
---------
Co-authored-by: ElementBot <android@element.io>
* Add floating date indicator while scrolling the timeline (#6433)
* Add `FeatureFlags.FloatingDateBadge`. This enables displaying the floating date badge in the timeline as you scroll.
* Don't display the floating badge if the timeline isn't reversed. Otherwise, this will affect talkback users and break the existing navigation
* Use `TimelineItem.formattedDate()` to get the date to display. Always try finding the closest one (usually it will be just the 1st one we try).
* Align designs with iOS. Also fix shadows in fade animation by adding some paddings.
* Update screenshots
---------
Co-authored-by: Gianluca Iavicoli <gianluca.iavicoli04@gmail.com>
Co-authored-by: ElementBot <android@element.io>
* Fix long messages not being clickable
As @bmarty found out, `clip = true` causes the click event to be ignored in some cases. Since we have the shape we want to draw and we're using a custom `onDraw` modifier anyway to cut-out part of the path, we can just draw everything using the modifier and avoid using `clip = true`.
This seems to fix the issue.
* Fix clipping of images or other items that cover the bubble
* Fix borders being displayed for contents
* Extract the layer drawing logic into `drawInLayer` to simplify the inlined code. Remove redundant code, those changes are now in the `drawInLayer` block
* Workaround for lint issue: it seems like detekt can't properly detect usages in content receivers
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
- Added `MediaSource.safeUrl` property replacing `withCleanUrl` method.
- Made `url` private so it can't be used externally.
- Reverted code in `CoilMediaFetcher`
- Also add tests
if something else grabs focus mid-recording (phone call, etc), stop
the recording and keep the partial result in preview state instead
of silently recording garbage
Signed-off-by: vmfunc <celeste@linux.com>
separates recording from playback focus - willPausedWhenDucked is false
for recording so notification sounds don't interrupt mid-recording
Signed-off-by: vmfunc <celeste@linux.com>
* Ensure aspect ratio of images in the timeline is restricted
Otherwise, this could cause a crash in Compose since the width and height values could become way too large.