* Fix leaving the room not always dismissing the room screen
Use the existing `RoomInfo` membership check to dismiss the room instead of using `RoomMembershipObserver`.
* Restore `membershipObserver`, check Maestro still works
* Improve the logic for the local membership change check
* Remove redundant room id check
- Add `runCatchingExceptions` and `mapCatchingExceptions` to replace `runCatching` and `mapCatching`.
- Make `tryOrNull { ... }` catch only exceptions too.
- Apply the changes to the whole project.
- Add new Rust fakes for tests to handle the code that's now unblocked - previously it just threw an `UnsatisfiedLinkError` which we ignored.
- Add a new `detekt-rules` project with a `RunCatchingRule` to prevent `runCatching` and `mapCatching` usages.
Since Android doesn't have support for SVG files we can't create a thumbnail or get the dimensions and other metadata needed for the `m.image` message type, so we need to send them as plain files
* Warn when opening a suspicious link.
Upgrade RTE to 2.38.3
* Update screenshots
* Add tests on LinkPresenter and LinkView.
* Format file
---------
Co-authored-by: ElementBot <android@element.io>
Breaking changes addressed:
* Make `MatrixClient.getNotificationSettings()` async, cache its result.
* Use `RoomInfo` for accessing the updated room's info.
* Refactor `MatrixRoom` so it always receives an initial `MatrixRoomInfo` value: this value will be used to make `MatrixRoom.roomInfoFlow` a `StateFlow` so we can assume the initial updated Room data will be present.
* Fetch encryption state when loading a room if it's unknown
* Close the attachment preview screen ASAP when sending media with the send queue is enabled
* When the send queue FF is not enabled make sure to dismiss the screen after the media has been sent
* Make sure we get a scaled thumbnail from videos too, not only for images
* Unify several state holders into `SendActionState`.
* Fix lint issues, add `Flow.firstInstanceOf` extension fun
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
2 replace all actions have been performed:
- "SPDX-License-Identifier: AGPL-3.0-only" to "SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial"
- "Please see LICENSE in the repository root for full details." to "Please see LICENSE files in the repository root for full details."
Improve day separator rendering in the timeline.
Use Today, Yesterday, and the name of the day if less than 7 days and do not render the year for the current year.
Improve date format for the media viewer.
Rework how date and time are computed.
ActionListView: Time can take more space, so update the layout.
* Use in-memory thumbnail APIs when possible
* Make an exception for animated image types.
Also add `TimelineItemImageContent.thumbnailMediaRequestData` lazy property.
* Try simplifying the logic a bit more.
* Upgrade the used JDK in the project to v21
* Use it for CI too
* Centralise java language version
* Fix deprecations, tests and lint issues
* Fix coverage taking into account `@Preview` annotated code.
---------
Co-authored-by: Benoit Marty <benoit@matrix.org>
* 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>
* Integrate mentions in the composer:
- Add `MentionSpanProvider`.
- Add custom colors needed for mentions.
- Use the span provider to render mentions in the composer.
- Allow selecting users from the mentions suggestions to insert a mention.
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>