Commit Graph

129 Commits

Author SHA1 Message Date
Benoit Marty
1292da2a72 Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
Benoit Marty
b748fcc631 Copyright: Add final period 2025-11-10 10:13:41 +01:00
Benoit Marty
0a0224b586 Copyright: run command uv run license-editor --repository ../element-x-android 2025-11-10 10:09:26 +01:00
Jorge Martin Espinosa
7491b5479a Allow uploading notification push rules in bug reports (#5538)
* Allow uploading push rules in bug reports

* Improve bug report screen previews

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-10-15 11:45:04 +02:00
Jorge Martin Espinosa
f1cd80ede8 Use shared recent emoji reactions from account data (#5402)
* Use shared recent emoji reactions from account data

- Add `AddRecentEmoji` and `GetRecentEmojis` use cases to avoid injecting the whole `MatrixClient` for just one of these operations.
- Update the UI and logic of the emoji picker and message context menu to include the recent emojis.
- Add `CoroutineDispatchers.Default` with the defaults coroutines to use in the app for ease of use.

* Instead of replacing suggested emojis, concatenate recent ones removing duplicates

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-09-26 11:04:34 +00:00
Jorge Martin Espinosa
28c09c1668 Fix leaving the room not always dismissing the room screen (#5089)
* 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
2025-08-12 10:37:31 +00:00
Benoit Marty
6f1fc5500b Remove duplicated licence header 2025-08-11 10:38:51 +02:00
Jorge Martin Espinosa
58a3ea8b1f Add catchingExceptions method to replace runCatching (#4797)
- 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.
2025-06-04 09:02:26 +02:00
Jorge Martin Espinosa
fe5d9b4308 Send SVG images as files (#4595)
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
2025-04-15 17:05:09 +02:00
Jorge Martin Espinosa
f59b26eb10 Limit the text length in the 'in reply to' preview (#4491)
* Limit the text length in the 'in reply to' preview

Otherwise, very long texts with no line breaks can cause a Compose crash
2025-03-27 14:37:38 +01:00
Benoit Marty
9ab6144001 Check link click (#4463)
* 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>
2025-03-25 18:17:20 +01:00
Jorge Martin Espinosa
1659572950 Update SDK version to 25.03.13 and fix breaking changes (#4406)
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
2025-03-19 12:52:57 +01:00
Benoit Marty
f7a4c999f7 Replace our firstIfSingle extension with singleOrNull from the Kotlin library. 2025-01-22 15:49:41 +01:00
Jorge Martin Espinosa
f72fb9650b Close the media preview screen ASAP with sending queue enabled (#4089)
* 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>
2025-01-08 15:49:17 +00:00
Benoit Marty
05fc76822a Apply dual licenses: AGPL + Element Commercial to file headers.
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."
2025-01-07 10:05:04 +01:00
Benoit Marty
6ef9db1bdb Make the room filter use normalized strings. 2024-12-16 16:18:15 +01:00
Benoit Marty
4188d58b56 Implement month separator for the Gallery.
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.
2024-12-11 23:57:57 +01:00
Benoit Marty
5920bc0e9f remove blank line. 2024-12-10 08:46:07 +01:00
Benoit Marty
28725a364f Media Gallery 2024-12-09 16:48:48 +01:00
ganfra
421bbba558 misc : introduce List.firstIfSingle extension 2024-12-09 11:18:04 +01:00
Jorge Martin Espinosa
4e9a75f10e Use in-memory thumbnail APIs when possible (#3817)
* 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.
2024-11-08 08:40:38 +01:00
Benoit Marty
1b4c79d9ff fix compilation warning 2024-10-15 00:22:30 +02:00
Jorge Martin Espinosa
60f1bf6e54 Upgrade the used JDK in the project to v21 (#3582)
* 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>
2024-10-03 09:38:03 +00:00
Benoit Marty
2b016227e9 Migrate license to AGPL.
Run script `uv run license-editor --repository ../element-x-android`
2024-09-06 17:19:19 +02:00
ganfra
ff3646ead0 Pinned messages: clean code 2024-09-04 14:27:18 +02:00
ganfra
3cc749dd0a Pinned events : start displaying actions in timeline 2024-08-30 15:15:22 +02:00
Benoit Marty
ff78512b78 Add isEnterpriseBuild to BuildMeta 2024-06-26 11:59:45 +02:00
Benoit Marty
38b68a93f0 Ensure that setting change is taken at least 300ms to avoid dialog flickering (#1647) 2024-06-12 12:50:56 +02:00
Benoit Marty
c9c0413c40 Ensure Posthog is only used for Element builds. 2024-06-04 17:04:19 +02:00
Benoit Marty
7d3cef33a9 Read versionCode from the Manifest, since BuildConfig.VERSION_CODE does not contain the correct last digit. 2024-05-24 15:06:47 +02:00
Benoit Marty
b156097e1a Add support for link generated by matrix.to website. 2024-05-03 11:57:22 +02:00
Benoit Marty
d082e666d5 Use productionApplicationName, set to "Element", instead of "Element X", and use ot for screen_onboarding_welcome_message 2024-04-10 16:45:14 +02:00
Benoit Marty
3ffa168774 Add desktopApplicationName to BuildMeta. 2024-04-10 12:36:41 +02:00
Jorge Martin Espinosa
d8f9408cdb Room member moderation: kick, ban and unban (#2496)
* Room member moderation: kick, ban and unban

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-03-06 16:44:05 +01:00
Benoit Marty
f47b9827c5 Restore branch and git sha, to use it in logs and in rageshakes.
Remove quite useless `gitRevisionDate`.
2024-01-25 14:16:21 +01:00
Benoit Marty
d3830af78b Fix ktlint issues 2024-01-10 19:33:39 +01:00
Benoit Marty
206a69938f Ignore ktlint issue for this particular class. 2024-01-10 19:31:36 +01:00
Jorge Martin Espinosa
bbc4d18a9d Open room member avatar in a media viewer (#1911)
* 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>
2023-11-28 17:39:41 +00:00
Jorge Martin Espinosa
b8ee82a912 Integrate mentions in the composer (#1799)
* 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>
2023-11-20 18:14:02 +01:00
jonnyandrew
5c582bba1b Record and send voice messages (#1596)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-23 17:28:00 +00:00
Benoit Marty
7afae87b3e Konsist: add rule obout test class name, and fix existing issue 2023-10-12 15:03:50 +02:00
Jorge Martin Espinosa
0502b21ff8 Fix: WebP images can't be sent as media. (#1501)
* Fix: WebP images can't be sent as media.

* Place the `BitmapFactory.Options` mode change and comment where it belongs.
2023-10-06 09:18:11 +00:00
Benoit Marty
45cd853c21 Improve default mime type. 2023-09-26 17:48:26 +02:00
Benoit Marty
b7487f9b5b Share tag with other modules. 2023-09-15 17:03:32 +02:00
Marco Romano
fb1299c955 Properly inline tryOrNull() (#1003)
Nullable params can't be inlined, default empty lambdas are therefore preferred.
2023-07-31 13:49:57 +00:00
Benoit Marty
4ba4bd1f56 Enable more detekt rules and remove unused extension. 2023-07-26 11:25:05 +02:00
ganfra
f7c55f8d04 Merge branch 'develop' into feature/fga/better_media_handling 2023-07-18 15:13:59 +02:00
Benoit Marty
f292c433ec Remove StableCharSequence, it was useful when we were using the Epoxy library. 2023-07-17 16:47:54 +02:00
ganfra
f66c3eb233 Media: add audio fixture for tests 2023-07-13 22:00:29 +02:00
Benoit Marty
9644091f3f Fix failing test. Code is now aligned with the comment. 2023-07-12 09:43:18 +02:00