Commit Graph

4303 Commits

Author SHA1 Message Date
Benoit Marty
fb4bb4e773 Merge commit from fork
* Check validity of Element Call url host.

* Prepare release 25.04.2
2025-04-17 11:58:13 +02:00
Benoit Marty
dbb96c5212 Ensure that we have only one single instance of SeenInviteStore per session (#4577)
* Ensure that we have only one single instance of SeenInviteStore per session. Fixes #4558

Fix crash:
java.lang.IllegalStateException: There are multiple DataStores active for the same file: /data/user/0/io.element.android.x/files/datastore/session_0ebb139587b6d940_seen-invites.preferences_pb. You should either maintain your DataStore as a singleton or confirm that there is no two DataStore's active on the same file (by confirming that the scope is cancelled).

* Inject the SeenInvitesStore to reduce boilerplate code.
2025-04-11 13:37:44 +00:00
ganfra
ce0bac55c5 Merge pull request #4574 from element-hq/feature/fga/advanced_settings_moderation_and_safety
change (preferences) : new moderation and safety settings
2025-04-11 14:38:46 +02:00
ganfra
4982d933d8 change (preferences) : some more final tweaks after review. 2025-04-11 13:00:44 +02:00
Benoit Marty
a1d8322738 Introduce PushHistoryService to store data about the received push (#4573)
* Introduce PushHistoryService to store data about the received push

Add a push database.

* Update screenshots

* Improve preview.

* Update screenshots

* Add missing test.

* Add test for PushHistoryView

* Fix configuration issue.

Was: w: /libraries/troubleshoot/impl/src/test/kotlin/io/element/android/libraries/troubleshoot/impl/history/PushHistoryPresenterTest.kt:35:27 Cannot access class 'PushProvider' in the expression type. While it may work, this case indicates a configuration mistake and can lead to avoidable compilation errors, so it may be forbidden soon. Check your module classpath for missing or conflicting dependencies.

---------

Co-authored-by: ElementBot <android@element.io>
2025-04-11 12:56:54 +02:00
ganfra
3209431555 change (preferences) : fix warning 2025-04-11 11:00:20 +02:00
ganfra
497022291b Merge branch 'develop' into feature/fga/advanced_settings_moderation_and_safety 2025-04-10 18:32:04 +02:00
ganfra
5fd987a116 change (preferences) : clean and fix tests 2025-04-10 18:10:50 +02:00
ganfra
64f139750c change (preferences) : bind timeline media preview with join rule 2025-04-10 18:10:37 +02:00
ganfra
b9eb4c49b7 change (preferences) : bind timeline media preview settings 2025-04-09 21:30:54 +02:00
ganfra
e231ef7a0e change (preferences) : hide invite avatars (room and sender) 2025-04-09 21:26:24 +02:00
ganfra
119d09c494 change (preferences) : move from dev settings to advanced settings and add new safety values 2025-04-08 20:27:47 +02:00
renovate[bot]
9981ae7b1e fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.4.7 (#4548)
* fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.4.8

* Fix API breaks:

- Add `ReplyParameters` class and parameters to send functions.
- Remove outdated OIDC related values.
- Stop pre-processing the timeline to add the timeline start item, this is already done by the SDK.

* Use the new function to reply to messages in a quick reply from a notification, however:

1. We don't have the thread id value at the moment since the SDK does not provide it yet.
2. The replied to event id wasn't being passed from the notification info.

* Remove also timeline start virtual item for DMs, since this wasn't present before either

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2025-04-08 14:21:49 +02:00
Benoit Marty
2f0eb9f068 Click on userId / room alias to copy value to clipboard. (#4549) 2025-04-08 09:23:02 +02:00
Benoit Marty
44f0c23149 Add a inderminate progress bar when loging out and in Waiting state. (#4538)
* Add a check network connection when the Waiting state last too long.

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-04-07 11:58:02 +02:00
Jorge Martin Espinosa
60ef6c6d89 Fix the share location URI (#4544)
* Fix the share location URI

Use `ENGLISH` locale to make sure the coordinates are formatted using the right decimal separator.

Also, when no label parameter was added, the URI just centered the map on some coordinates, instead of adding a marker.
2025-04-07 11:56:25 +02:00
Jorge Martin Espinosa
9390964b01 Allow using a hardware keyboard to unlock the app using a pin code (#4530)
* Allow using a hardware keyboard to unlock the app using a pin code

* Add UI tests to `PinKeypad`

* Also take into account the numpad keys.

Extract this to an extension property in `ui-utils`. Made `ui-utils` also a compose-compatible library (vs `android-utils`, which doesn't have compose dependencies).
2025-04-07 11:55:35 +02:00
Jorge Martin Espinosa
dac0eb6762 Fix bullet points not having leading margin on timeline items (#4536)
* Fix bullet points not having leading margin on timeline items

* Remove other usages of `SpannableString` constructor, use either `valueOf` to reuse the existing value or `SpannedString` instead if the spans don't have to change
2025-04-07 10:50:45 +02:00
ElementBot
3ded30e8fd Sync Strings from Localazy (#4543)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-04-07 09:20:32 +02:00
Benoit Marty
ef8eeb804e Remove the green badge on a pending invite after a first preview (#4532)
* Remove condition on displayType as I believe, that it has no effect.

* Remove the green badge on a pending invite after a first preview

* Update screenshots

* Fix test

* Improve DefaultSeenInvitesStore, clear it on logout, and on clear cache. Also create a store per session.

* Remember the returned flow.

---------

Co-authored-by: ElementBot <android@element.io>
2025-04-04 16:51:31 +02:00
Benoit Marty
77a7c0b2e5 Remember flows (#4533)
* Add Konsist test to ensure that the result of a function returning a flow is remembered.

* Remember flows before they are collected by state.

* Fix compilation issue

* Make isOnline a val.

* Make selectedUsers() a val.

* Make flow() a val.

* Make getUserConsent(), didAskUserConsent() and getAnalyticsId() some val.

* Remove Timeline.paginationStatus() and replace by direct access to the underlined flow.

* Simplify test

* userConsentFlow must be initialized before because it's used in observeUserConsent

* Fix test compilation
2025-04-04 16:50:43 +02:00
Benoit Marty
da414b625e Remove alias from room invite item (#4531)
* Remove the potential room alias from invitation cells

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-04-03 17:11:23 +02:00
Benoit Marty
a3ce1d484d Replace OutlinedTextField by our TextField (#4521)
* Let TextFieldListItem take the entire width.

* Add unit test to detect usage of OutlinedTextField.

* Use TextField instead of OutlinedTextField

* Remove unnecessary opt in to ExperimentalFoundationApi

* Use TextField instead of OutlinedTextField

* Fix compilation issue.

* Update screenshots

* ListDialog: add space between items.

* Update screenshots

* Set applyPaddingToContents to true by default.

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-04-02 14:04:07 +00:00
Jorge Martin Espinosa
3d4b8c9b2a Enable Rust trace log packs (#4514)
* Enable Rust trace log packs

This is a way to forcefully enable trace logs only for a few Rust crates in a safe way
2025-04-02 11:21:53 +00:00
Jorge Martin Espinosa
5d697711c0 Make sure the live timeline is destroyed before clearing a room's cache (#4515)
* Make sure the live timeline is destroyed before clearing a room's cache

According to the SDK team, having a live timeline could lead to DB issues.

* Try to destroy all room and list item references when the `RustRoomFactory` is destroyed

It may also have some effect on DB corruption issues we've seen
2025-04-02 12:58:40 +02:00
Jorge Martin Espinosa
e45151d9d1 Add WakeLock to dismiss ringing call screen when call is cancelled (#4478)
* Add `WakeLock` to dismiss ringing call screen when call is cancelled

We had already some checks in place to automatically cancel a ringing call notification/screen when the call was no longer active, but the `RoomInfo` updates weren't being processed because the app was 'paused'.

The partial wakelock should ensure these room info updates are handled.

* Add mutual exclusion to `ActiveCallManager` methods to improve thread safety
2025-04-02 09:51:39 +00:00
Benoit Marty
c65b54d3b7 Improve TextFieldDialog (#4512)
* Extract TextFieldDialog to its own file (no other change).

* Add TextFieldDialogPreview

Enhance TextFieldDialog

* Let RoomMembersModerationView use TextFieldDialog

* Update screenshots

* Konsist.

* Add modifier parameter.

---------

Co-authored-by: ElementBot <android@element.io>
2025-04-02 10:05:56 +02:00
Benoit Marty
0545c56486 Add kick (remove) confirmation and reason (#4507)
* Add confirmation dialog when kicking someone, ith ability to provide a reason.

Also add the reason for banning people.

* Fix padding issue in dialogs.

* Improve TextField in dialog.

* Update screenshots

* Fix tests

* Format and import

* Add missing UI tests.

* Use `needsConfirmation` as it's already used in the code base.

---------

Co-authored-by: ElementBot <android@element.io>
2025-04-01 11:38:46 +02:00
ElementBot
2c62c44c11 Sync Strings from Localazy (#4506)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-03-31 10:58:46 +02:00
Benoit Marty
f425965e2e Timeline header: ensure that the decoration is clickable (#4495)
* Timeline header: ensure that the decoration is clickable, and properly fix the icon rendering.

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-03-28 17:28:24 +01:00
Benoit Marty
020ba00bcf Use handy buildConfigFieldStr. (#4501) 2025-03-28 16:54:16 +01:00
ganfra
042c0c5a6b Change (mention span) : rework and add more cases (#4476)
* change(mention span) : improve truncation logic

* change(mention span) : fix theme switching

* change(mention span) : start to pillify permalinks

* change(mention span) : use permalink directly

* change(mention span) : start improving mention type

* change(mention span) : use the appropriate MentionSpanProvider methods

* change(mention span) : introduce MentionSpanFormatter

* change(mention span) : introduce MentionSpanUpdater

* change(mention span) : Improve RoomNameCaches

* change(mention span) : remove useless param on HtmlConverterProvider

* change(mention span) : fix some remaining issues on the composer

* change(mention span) : remove pillifiedBody

* change(mention span) : fix some issues with pillification

* change(mention span) : fix getMentionsSpans

* change(mention span) : make sure all tests passes

* change(mention span) : remove the coroutine from the caches and a MentionSpanFormatterTest

* change(mention span) : add more tests on pillification

* change(mention span) : clean up

* Update screenshots

* change(mention span) : remove unexpected print

* change(mention span) : remove default values in constructor of TimelineTextBasedContent classes

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-03-28 11:20:32 +01: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
Jorge Martin Espinosa
38aa3f1e96 Improve touch indicators for the user info UI in the timeline (#4482)
* For the user info in the timeline items, display the ripple effects according to the bounds and shape of the user avatar and display name

* Fix ripple in other screens too
2025-03-27 14:09:47 +01:00
Benoit Marty
87fd1372a9 Element config (#4471)
* Add handy extension "VariantDimension.buildConfigFieldStr"

* Update configuration for MapTiler.

* Update configuration for Sentry.

* Build AnalyticsConfig depending on analytics configuration.

* Configure analytics policy url.

* Add handy extension "VariantDimension.buildConfigFieldBoolean"

* Configure legal urls.

* Add a way to disable rageshake / reporting bugs.

* Update screenshots

* Quality

* Fix test

* Use `ifBlank` extension

* Add missing configuration for PostHog

* Update configuration for Rageshake.

* Add build log.

* Disable crash detection if rageshake feature is not available.
Disabled twice.

* Hide link to analytics policy if the link is missing.

* Fix test when run in enterprise context.

* Use RageshakeFeatureAvailability where appropriate.

* Rename file.

* Move some classes to their correct module.

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-03-27 11:25:04 +01:00
ganfra
63fb2dd95e Merge pull request #4485 from element-hq/feature/fga/composer_suggestions_update
Change : composer suggestions
2025-03-27 09:49:19 +01:00
ganfra
009bf71aca change (composer suggestions) : add filtering rooms by name 2025-03-26 21:46:48 +01:00
ganfra
d2b6014b5e change (composer suggestions) : remove feature flag 2025-03-26 21:46:23 +01:00
Jorge Martin Espinosa
3eebb4c19f Fix flaky incoming verification tests (#4479) 2025-03-26 16:03:30 +01:00
Jorge Martin Espinosa
e2febabcf6 Use embedded version of Element Call (#4470)
* Use embedded version of Element Call: for in-app room calls, the app will use an embedded version of Element Call shipped with the app instead of using an external service.

* Remove `ElementCallBaseUrlProvider` so we don't use the Element well known file to get the base URL anymore

* Remove `ElementCallConfig.DEFAULT_BASE_URL` since it's not used anymore

* Restore the usage of the custom EC base URL in developer settings as the actual base URL, it present

* Add a way to customise the embedded EC analytic credentials

* Update CI to use the EC analytic credentials as secrets

* Improve the custom URL placeholder to include the `/room` suffix
2025-03-26 09:35:21 +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
e1309b1705 Fix 'unverified session' flow displayed when creating account (#4467)
* Fix 'unverified session' after creating an account: when creating an account, wait until the session is verified before marking the authentication flow as completed.
2025-03-25 16:25:41 +01:00
Jorge Martin Espinosa
bb97015e59 Add 'unencrypted room' badges and labels (#4445)
* Add 'unencrypted room' icon and label to composer

* Modify colors for room details screen info labels

* Add exception to Konsist's preview check

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-03-25 11:26:25 +00:00
Andy Balaam
56683259d9 Use 'Dismiss' to close pinned identity changes, instead of 'Ok' (#4454) 2025-03-25 10:57:51 +01:00
ElementBot
2f8b40777d Sync Strings (#4461)
* Sync Strings from Localazy

* Fix UI tests

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2025-03-24 16:45:24 +00:00
Benoit Marty
f0a6a0037c Let element enterprise be able to configure id for mapTiler. (#4446)
* Let element enterprise configure the ids for maptiler service.

* Disable location sharing and location viewer is the service is not available.

* Fix compilation issue on connected test

* Do not allow to reload the map if the mapId is not available.

* Update screenshots

* Rename file.

* Better to inject a string provider here, so we can unit test DefaultLocationService.

---------

Co-authored-by: ElementBot <android@element.io>
2025-03-21 17:06:52 +01:00
Jorge Martin Espinosa
d27a61a588 Make verification screens scrollable and emoji labels multiline (#4449)
* Make self verification screens scrollable

* Remove unused fields from `VerificationEmoji`

* Make only the header and content scroll in `HeaderFooterPage`.

* Use the right 'emoji' icon in both flows (`ReactionSolid`)

---------

Co-authored-by: ElementBot <android@element.io>
2025-03-21 12:18:38 +01:00
ganfra
f85abe27fc Merge pull request #4399 from element-hq/feat/add-timeline-prefetching-mechanism
Add timeline item prefetching
2025-03-20 11:11:57 +01:00
Benoit Marty
529ba919cf Add a filter to avoid stack overflow when pressing the back button several times. (#4430)
Fixes #4181
2025-03-19 15:31:06 +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