Commit graph

1804 commits

Author SHA1 Message Date
Benoit Marty
3603ed6830
Fix read receipt behavior when the timeline is opened. (#4679)
* Use Timber instead of println

* Fix ReadReceipt not sent when new event is received:
- filter Virtual item regarding typing to compute NewEventState
- always scroll, since the latest event is always the typing notification (but with 0 height). This triggers the sending of RR.

* Improve the fix to fix regression detected by unit tests.

* Remove unnecessary parenthesis

* Document parameter.
2025-05-06 12:41:34 +00:00
ElementBot
bfa05ece67
Sync Strings from Localazy (#4677)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-05-05 12:11:22 +02:00
ElementBot
847f8fcbf6
Sync Strings from Localazy (#4648)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-04-28 10:59:35 +02:00
Jorge Martin Espinosa
619aa6f2de
Split MatrixRoom into BaseRoom and JoinedRoom (#4561)
`JoinedRoom` will now contain both a mandatory live timeline reference and all the functionality associated to it.

`BaseRoom` on the other hand will contain only functionality that's shared for both joined and not joined rooms.

`NotJoinedRoom` is a wrapper around `RoomPreviewInfo` data and a possible local `BaseRoom`, if it exists.

The `RustRoomFactory` cache is now gone since the persistent event cache should have the same effect.
2025-04-23 15:53:40 +02:00
Benoit Marty
4e0d00d970
Ensure that pinning an event makes the pinned messages banner appear (#4606) 2025-04-22 17:27:02 +02:00
ElementBot
e3a32ba52e
Sync Strings from Localazy (#4612)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-04-22 08:57:00 +02:00
Jorge Martin Espinosa
740c28eda9
Improve accessibility of the timeline (#4579)
* Make whole messages selectable and readable as a single unit when possible.
* Make most UI components not clickable when talkback is enabled.
* Make voice messages work with talkback too.
* Read grouped state events even if the events are collapsed.
* Move image and video item actions to the timeline item.
* Improve accessibility in the message context menu too
* Fix a11y issue on add attachment button.
* Add `contentDescription` to file icon so it's read aloud

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-04-15 15:28:29 +00:00
ElementBot
d9bfcc6c52
Sync Strings (#4590)
* Sync Strings from Localazy

* Fix strings usage after some were moved

* Fix Norwegian string that was causing lint to fail

* Update screenshots

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2025-04-14 11:24:28 +02:00
ganfra
322dd9a945 Merge branch 'develop' into feature/fga/advanced_settings_moderation_and_safety 2025-04-10 18:32:04 +02:00
ganfra
14681c56b7 change (preferences) : clean and fix tests 2025-04-10 18:10:50 +02:00
ganfra
5725e328fe change (preferences) : bind timeline media preview with join rule 2025-04-10 18:10:37 +02:00
ganfra
ca1c2ae4a4 change (preferences) : bind timeline media preview settings 2025-04-09 21:30:54 +02:00
ganfra
546cd20e51 change (preferences) : move from dev settings to advanced settings and add new safety values 2025-04-08 20:27:47 +02:00
renovate[bot]
b9385ce382
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
Jorge Martin Espinosa
977268b876
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
Benoit Marty
a230b83e99
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
670af86e8b
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
ElementBot
c3ee00ed09
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
348f787058
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
ganfra
97bd7b7479
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
058d8f297f
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
fa6c5e6a92
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
ganfra
e6985b1e5f change (composer suggestions) : add filtering rooms by name 2025-03-26 21:46:48 +01:00
ganfra
bfe1aa7edf change (composer suggestions) : remove feature flag 2025-03-26 21:46:23 +01:00
Benoit Marty
68c1d30743
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
b9e286d9d6
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
f969dcf42e
Use 'Dismiss' to close pinned identity changes, instead of 'Ok' (#4454) 2025-03-25 10:57:51 +01:00
ElementBot
8f0075e367
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
2fd1c21df0
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
811ba95ffc
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
fccd881b1f
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
badca699e6 Use snapshotFlow inside a LaunchedEffect, improve pre-fetching strategy 2025-03-19 11:41:34 +01:00
Benoit Marty
4adee708fc Fix preview issue.
TimelineItemEventForTimestampViewProvider can now have event content which is not TimelineItemTextContent
2025-03-18 16:25:42 +01:00
Benoit Marty
0e261689e9 Add preview. 2025-03-18 14:27:10 +01:00
Benoit Marty
b4076e5b2d
Merge pull request #4410 from Xant3s/feature/hideUnencryptedLockForRedactedMsgs
Hide "unencrypted" lock for redacted messages
2025-03-18 14:26:34 +01:00
Benoit Marty
ac548bd07a
Remove unused import 2025-03-18 12:28:57 +01:00
Benoit Marty
b70aef0a08
Comment out new preview. 2025-03-18 12:27:57 +01:00
Jorge Martín
e1506d9e97 Fix tests and lint issues 2025-03-17 18:22:03 +01:00
Jorge Martín
8f129eb285 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
d15b227c33 Fix lint issues 2025-03-17 13:53:28 +01:00
Jorge Martín
54221d9951 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
826135e2db Added preview for redacted messages 2025-03-17 13:10:30 +01:00
Samuel Truman
3469f4600a Hide "unencrypted" lock for redacted messages 2025-03-17 13:10:29 +01:00
Jorge Martín
ff0e1ad2af Display user verification violation icon in Dm rooms too
Also adjust the icon size, it was larger than it should (24px vs 16px)
2025-03-17 10:13:13 +01:00
Benoit Marty
17f66245f1 Disable click effect on Stickers. Closes #4342 2025-03-12 18:23:52 +01:00
Jorge Martin Espinosa
fd50ce4daf
Add user verification and verification state violation badges (#4392)
* Move `observeRoomMemberIdentityStateChange` and associated classes to `libs:matrixui` module so they can be reused

* Add `EncryptionService.getUserIdentity` method to retrieve not only if the user is verified or not, but in which state they are

* Fix `IdentityChangePresenter` after the previous changes

* Fix `withFakeLifecycleOwner` and add `testWithLifecycleOwner` helper

* Display verified badge in DM top app bar when possible

* Display a verification violation warning icon next to the 'People' item in room details screen

* Display either a verified badge or a verification violation warning icon next to the room members in the room member list screen

* Display either a verified badge or a verification violation warning and withdraw verification button in the room member profile.

Generic user profiles won't display verification state anymore since we can't easily track changes in it.

* Add preview for room member details screen with verification violation identity state

* Add verified and violation badge to the `Profile` list item in room details screen

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-03-12 12:22:53 +01:00
Benoit Marty
44b837a6bd
Merge pull request #4378 from element-hq/feature/bma/customSuperButton
Be able to correctly render the UI with other colors.
2025-03-11 09:26:54 +01:00
Benoit Marty
2ce1b17dae
Merge pull request #4381 from element-hq/sync-localazy
Sync Strings - New translations in Basque
2025-03-10 11:17:49 +01:00
Benoit Marty
96683850ba Change LocalIsEnterpriseBuild to LocalBuildMeta 2025-03-10 11:08:50 +01:00
Benoit Marty
7e8ed314e6
Merge pull request #4376 from ShadowRZ/features/shadowrz/long-press-link-copy
Long press link to copy URL to clipboard
2025-03-10 09:17:16 +01:00