Commit Graph

4285 Commits

Author SHA1 Message Date
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
Jorge Martín
784f00feb8 Use snapshotFlow inside a LaunchedEffect, improve pre-fetching strategy 2025-03-19 11:41:34 +01:00
Benoit Marty
bb9e01a9f8 Fix preview issue.
TimelineItemEventForTimestampViewProvider can now have event content which is not TimelineItemTextContent
2025-03-18 16:25:42 +01:00
Benoit Marty
9d162ca789 Add preview. 2025-03-18 14:27:10 +01:00
Benoit Marty
1562ab0ab3 Merge pull request #4410 from Xant3s/feature/hideUnencryptedLockForRedactedMsgs
Hide "unencrypted" lock for redacted messages
2025-03-18 14:26:34 +01:00
Benoit Marty
4bf9d9d43f Merge pull request #4423 from element-hq/fix/display-user-verification-violation-on-top-app-bar-of-room-screen
Display user verification violation icon in DM rooms too
2025-03-18 14:24:19 +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
4d5f63f9f0 Remove blank line 2025-03-18 12:31:41 +01:00
Benoit Marty
7fc11c96fa Remove unused import 2025-03-18 12:28:57 +01:00
Benoit Marty
807c3de1e4 Comment out new preview. 2025-03-18 12:27:57 +01:00
Benoit Marty
2b7b2e1358 i18n 2025-03-18 11:43:13 +01:00
Benoit Marty
e02517b9a3 Extract FileContent to its own file. 2025-03-18 11:38:36 +01:00
Jorge Martín
f95a959ed1 Fix tests and lint issues 2025-03-17 18:22:03 +01:00
Jorge Martín
97b20d102f Try improved version using snapshotFlow, which seems more performant, as well as an extended threshold (-40 items) 2025-03-17 16:30:43 +01:00
Jorge Martín
955a599d5c Fix lint issues 2025-03-17 13:53:28 +01:00
Jorge Martín
98bb5720d1 Add timeline prefetching
This should trigger when getting close the start of the loaded timeline, making scrolling back smoother, specially when combined with the persistent event cache.
2025-03-17 13:53:28 +01:00
Samuel Truman
5fd6520ac2 Added preview for redacted messages 2025-03-17 13:10:30 +01:00
Samuel Truman
dedc3be0ef Hide "unencrypted" lock for redacted messages 2025-03-17 13:10:29 +01:00
Jorge Martín
ea13730601 Adjust the size of the verification icon in the room member list too
It was 24dp, it should be 20dp.
2025-03-17 10:14:40 +01:00