Commit Graph

3779 Commits

Author SHA1 Message Date
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
6a180cb279 Fix warnings in InMemoryAppPreferencesStore (#4523) 2025-04-02 18:03:14 +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
renovate[bot]
a8a5b55c81 fix(deps): update kotlin (#4444)
* fix(deps): update kotlin

* Fix 'exhaustive when' issue

* Fix lint issues

* Fix issue in merge conflict resolving.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: Benoit Marty <benoitm@element.io>
2025-04-02 15:55:50 +02: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
19c58489d0 Make RustMatrixClient.close asynchronous (#4513)
* Make `RustMatrixClient.close` asynchronous

This is a safer way to destroy the Rust instances associated to it. Since `MatrixClient` doesn't implement `Closeable` anymore, the method has been renamed to `destroy` to follow the existing naming in the project.
2025-04-02 09:52:37 +00: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
Jorge Martin Espinosa
1eff15d6e4 Add video autoplay to media gallery (#4499)
* Add video autoplay when opening the video from either the timeline or the media gallery

* Only autoplay when the video is first displayed
2025-04-01 07:44:06 +00: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
ganfra
f8bc2f929d Merge pull request #4488 from element-hq/renovate/media3
fix(deps): update media3 to v1.6.0
2025-03-28 15:10:53 +01:00
renovate[bot]
2a7a58c1d7 fix(deps): update media3 to v1.6.0 2025-03-28 14:42:54 +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
a82f756c49 Check if Manifest.permission.REQUEST_INSTALL_PACKAGES is in the manifest before invoking canRequestPackageInstalls. (#4490) 2025-03-27 12:58:44 +01:00
ganfra
d2b6014b5e change (composer suggestions) : remove feature flag 2025-03-26 21:46:23 +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
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
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
renovate[bot]
721becf45d fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.3.24 (#4394)
* fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.3.24

* Fix SDK changes related to:
    - OIDC authentication.
    - Element Call widget URL generation.
    - Forced trace logging in the SDK.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2025-03-24 17:07:44 +01: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
ganfra
8ec57d162b Merge pull request #4452 from element-hq/feature/fga/update_rust_sdk_25.03.20
deps(rust sdk) : update to 25.03.20 and fix api change
2025-03-21 13:09:15 +01:00
ganfra
29bc9ee68f deps(rust sdk) : update to 25.03.20 and fix api change 2025-03-21 12:43:28 +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
Benoit Marty
93d27735e4 Clear SDK cache properly (#4396)
* Use close() instead of destroy, because close() is synchronized.

* Use new method to clear the SDK cache.

* Format file.

* Remove the legacy way to clear the SDK cache.

* Remove unused import

* revert name change
2025-03-20 13:33:59 +00: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
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
94eb54abcf Merge pull request #4414 from element-hq/feature/bma/openTxtDocument
Open txt document inside the application
2025-03-18 14:18:29 +01:00
Benoit Marty
2b7b2e1358 i18n 2025-03-18 11:43:13 +01:00
Benoit Marty
af866e3407 Fix issues reported by Konsist. 2025-03-18 11:35:11 +01:00
Benoit Marty
ba59fe27ba Add preview for Text media. 2025-03-18 11:24:13 +01:00
Jorge Martín
f95a959ed1 Fix tests and lint issues 2025-03-17 18:22:03 +01:00
Benoit Marty
70c8524e20 Merge pull request #4413 from element-hq/feature/bma/fixOpenMedia
Ensure that a click on a media open the correct media.
2025-03-17 10:06:56 +01:00
Jorge Martin Espinosa
e2afa9a691 Add Google Tink dependency, replacing androidx.security.crypto (#4405)
* Add Google Tink dependency, replacing `androidx.security.crypto`

* Replace the `EncryptedFile` implementation too

* Extract constants, add some more docs
2025-03-17 10:04:21 +01:00
ElementBot
6dbb371ca2 Sync Strings from Localazy (#4421)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-03-17 09:54:03 +01:00
Benoit Marty
5825160d29 Fix test compilation error. 2025-03-17 09:29:45 +01:00
renovate[bot]
a97d3d4ac3 fix(deps): update dependency net.java.dev.jna:jna to v5.17.0 2025-03-16 13:29:43 +00:00
Benoit Marty
207fcc829c Ensure that a click on a media open the correct media. 2025-03-14 17:23:38 +01:00
Benoit Marty
b6bbb0bc7a Render txt files content.
PdfViewer increase the top padding.
2025-03-14 16:51:57 +01:00
Benoit Marty
6d6be64311 Merge pull request #4402 from element-hq/misc/enable-logcat-in-all-builds
Add feature flag to let the application prints logs to logcat in release builds.
2025-03-14 11:33:57 +01:00
Jorge Martín
cb5dcf9b79 Use a feature flag to decide whether logs should be printed to logcat or not
This is done so it can be temporarily enabled on release builds for quick debugging sessions, then disabled again.
2025-03-13 16:11:53 +01:00
Benoit Marty
2dfa1ab64d Merge branch 'develop' into feature/bma/customPushGateway 2025-03-13 11:39:47 +01:00
Jorge Martin Espinosa
e3dcb683b8 Fix warnings in tests for push provider modules (#4398) 2025-03-12 17:36:31 +01:00
Benoit Marty
b30e1095c9 Give ability to configure the UnifiedPush default push gateway. 2025-03-12 17:10:33 +01:00
Benoit Marty
cd48d051a8 Give ability to configure the Firebase push gateway. 2025-03-12 16:50:46 +01:00
Benoit Marty
a930e9ae6b Merge pull request #4397 from element-hq/feature/bma/fixNoMoreMediaToShow
…Ensure the snackbar "No more media to show" is not rendered when opening the media viewer.
2025-03-12 12:27:49 +01:00