Commit graph

4643 commits

Author SHA1 Message Date
Jorge Martin Espinosa
8245ad8bc3
Handle preference stores corruption by clearing them (#5086)
* Handle preference stores corruption by clearing them:
    - Use the centralised `PreferenceDataStoreFactory` instead of `preferences by`.
    - Add `DefaultPreferencesCorruptionHandlerFactory.replaceWithEmpty` to its `create(name)` method so all preference stores are cleared if they're corrupted.

* Add detekt rule to make sure we use `PreferenceDataStoreFactory` instead of `by preferencesDataStore`

* Remove `@SingleIn` annotations as the annotated class no longer have to be singletons
2025-08-22 06:59:06 +00:00
Benoit Marty
c3bd1492b6 Rename RoomPreviewMembersCountMolecule to MembersCountMolecule 2025-08-20 17:13:42 +02:00
Benoit Marty
2ee4b4fdcb Move AvatarRow to designsystem module, because it will be used by spaces. 2025-08-20 15:56:46 +02:00
Jorge Martin Espinosa
9bc2c4a776
Add shortcut suggestions for rooms, remove then when leaving (#5180)
* Report shortcut usage for outgoing messages

This patch adds support for creating and pushing dynamic
long-lived shortcuts for outgoing messages. This together
with an existing reference to the roomId used by the
shortcuts as an identifer allows conversations to be
prioritized.

See https://developer.android.com/training/sharing/direct-share-targets#report-usage-outgoing

* Simplify how to get the other user in a DM room

* Add initial avatar icons to shortcuts

* Remove room shortcuts when they're no longer joined

* Try using API 33 for the new tests. They worked locally with API 30, so it's weird the CI asks for a higher API version.

* Add observers for the pin code and session logout states. With this we can prevent new shortcuts from being created and remove existing ones when needed.

* Wrap all calls to `ShortcutManagerCompat` with `runCatchingExceptions` to avoid crashes

* Make `DefaultNotificationConversationService` a singleton.

---------

Co-authored-by: networkException <git@nwex.de>
Co-authored-by: ElementBot <android@element.io>
2025-08-19 16:02:51 +02:00
Jorge Martin Espinosa
35928e3630
Threads - first iteration (#5165)
* Initial threads support: parse `ThreadSummary`.

Replace several `isThreaded` values with `EventThreadInfo`, which contains the info about the event either being the root of a thread or part of it.

* Add `Threaded` timeline mode

* Add a `liveTimeline` parameter to `TimelineController`'s  constructor. This way we can customise which timeline will be used as the 'live' one. Also add `@LiveTimeline` DI qualifier for the actual live timeline of the room.

* Create `ThreadedMessagesNode`. Allow opening a thread in a separate screen.

* Add the callbacks for the list menu actions - even if they're the wrong ones and will send the data to the room instead

* Send attachments and location in threads

* Fix polls in threads, add support for sending voice messages in threads

* Display thread summaries only when the feature flag is enabled

* Use 'Reply' instead of 'Reply in thread' when in threaded timeline mode

* Remove incorrect usage of `Timeline` in `MessageComposerPresenter`. This led to replies to threaded events not appearing as actual replies.

---------

Co-authored-by: ElementBot <android@element.io>
2025-08-19 13:35:48 +00:00
Benoit Marty
cc10ba41fd
Merge pull request #5185 from element-hq/feature/bma/invitePoepleUi
Iterate on invite people UI
2025-08-19 11:12:45 +02:00
Jorge Martin Espinosa
85b0f11ab6
Fix bitrate value used for video transcoding (#5183)
* Fix bitrate value used for video transcoding:

It should be 1000 times what it is now. The video size estimation was wrong since the retrieved duration value was in milliseconds, not seconds.

* Use `Duration` as the result type for `getDuration`
2025-08-18 21:12:11 +00:00
Benoit Marty
a5f12f747f [UI] Iterate on user invite view. 2025-08-18 17:16:06 +02:00
renovate[bot]
90ad9616c0
Update dependency org.matrix.rustcomponents:sdk-android to v25.8.18 (#5182)
* Update dependency org.matrix.rustcomponents:sdk-android to v25.8.18

* Fix broken API changes:
- The send queue usage is now mandatory.
- The media upload progress now comes back in the send queue state (this still hasn't been applied to the UI in the timeline).

* Update screenshots
---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <android@element.io>
2025-08-18 16:41:14 +02:00
ElementBot
7c40c87d9a
Sync Strings from Localazy (#5178)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-08-18 11:09:27 +02:00
Benoit Marty
de16268674
Merge pull request #5166 from element-hq/feature/fga/create_room_flow_rework
Create room flow rework
2025-08-18 09:38:28 +02:00
Benoit Marty
476a2b9007 Avoid using runBlocking in Node resolve function. 2025-08-14 16:53:35 +02:00
Benoit Marty
037e5dbce4 Revert "Provide default value for modifier."
This reverts commit 67b4d315fe.
2025-08-14 16:05:50 +02:00
Benoit Marty
ee3b3c6f13 Use SessionCoroutineScope here. 2025-08-14 14:41:51 +02:00
Benoit Marty
67b4d315fe Provide default value for modifier. 2025-08-14 14:39:00 +02:00
Benoit Marty
003249faa6 Use string from Localazy. 2025-08-14 11:46:28 +02:00
Benoit Marty
f061f981fc iterate on the isSelected value. Let the UI decide how to render. 2025-08-14 11:46:26 +02:00
Benoit Marty
6877c7cc88 Remove default values for InvitableUser's constructor 2025-08-14 09:10:22 +02:00
Benoit Marty
c6fb2c0c58
Merge pull request #5161 from element-hq/feature/bma/movePushHistory
Move push history entry point from notification settings to developer settings
2025-08-14 09:00:31 +02:00
Benoit Marty
7271fe6e68 Try to fix tests on CI (they are passing locally). 2025-08-13 18:43:16 +02:00
Benoit Marty
186d06c73e Cleanup Localazy config and do a sync. 2025-08-13 17:41:44 +02:00
Benoit Marty
ba7d1fbe3a Use string from Localazy 2025-08-13 17:19:38 +02:00
Benoit Marty
e1095c0688
Merge pull request #5117 from element-hq/renovate/showkase
Update showkase to v1.0.5
2025-08-13 17:01:11 +02:00
Benoit Marty
6989e10c19 Add string to Localazy 2025-08-13 16:59:12 +02:00
Benoit Marty
0dba05be0a Cleanup codebase 2025-08-13 16:56:33 +02:00
Benoit Marty
586e840a74 Fix tests 2025-08-13 16:24:13 +02:00
Benoit Marty
9d0dd66018 Add more tests 2025-08-13 15:57:35 +02:00
Benoit Marty
c5b256e353 Create fun handleEvents 2025-08-13 15:37:31 +02:00
Benoit Marty
4e334efb51 Move and fix test for DefaultInvitePeoplePresenter 2025-08-13 15:36:01 +02:00
Jorge Martín
cb486e93d7 Remove libs.showkase entry in composeDependencies
Add it only to the needed library modules.
2025-08-13 11:43:57 +02:00
Benoit Marty
bb5bff7987 Rename Preview 2025-08-13 11:23:34 +02:00
Benoit Marty
0120575b39 Rename Test to follow naming convention 2025-08-13 11:22:40 +02:00
Benoit Marty
2050223fe2 Rename View to follow naming convention and file name 2025-08-13 11:21:31 +02:00
Benoit Marty
8be9173f1b Rename provider to follow naming convention 2025-08-13 11:19:21 +02:00
Benoit Marty
23c8d01d90 State data class cannot have default values. 2025-08-13 11:17:05 +02:00
ganfra
1edd419915 refactor (start chat) : properly finish create room flow 2025-08-13 11:06:45 +02:00
ganfra
74f6a83219 refactor (start chat) : use invite people module in room details screen 2025-08-13 11:06:45 +02:00
ganfra
bfd1182baf refactor (start chat) : remove useless code 2025-08-13 11:06:44 +02:00
ganfra
b4a8b17391 refactor (start chat) : create invite people module and start branching them 2025-08-13 11:06:43 +02:00
ganfra
41cf1afce3 refactor (start chat) : start splitting things (create room, invite people, start chat) 2025-08-13 11:06:42 +02:00
Benoit Marty
51b5d58327 Fix tests. 2025-08-13 10:35:46 +02:00
Benoit Marty
58ce545d98
Merge pull request #5160 from element-hq/feature/bma/cleanupFeatureFlags
Remove old feature flags
2025-08-12 18:21:44 +02:00
Benoit Marty
80345dc3d0 Move push history entry point from notification settings to developer settings.
Closes #5159
2025-08-12 17:32:03 +02:00
Jorge Martin Espinosa
516c3cfda3
Provide calculated server names when opening a room from another (#5155)
* Provide calculated server names when opening a room from another, based on the most frequently used domain names in the user ids for the users in the room.

This helps when following permalinks or navigating to the successor room of a tombstoned one. Previously, the `/summary` endpoint was failing because no server names were used in the `via` parameters.
2025-08-12 15:17:46 +00:00
Benoit Marty
d04434e20e Remove FeatureFlag.MediaUploadOnSendQueue 2025-08-12 16:08:46 +02:00
Benoit Marty
34efd2c3fa Remove FeatureFlag.MediaCaptionCreation and FeatureFlag.MediaCaptionWarning 2025-08-12 16:08:45 +02:00
Benoit Marty
dcb6055783 Remove FeatureFlag.MediaGallery 2025-08-12 16:08:45 +02:00
Benoit Marty
4f0535714e Remove FeatureFlag.PinnedEvents 2025-08-12 16:08:44 +02:00
Benoit Marty
be9861bea9 Remove FeatureFlag.QrCodeLogin 2025-08-12 16:08:43 +02:00
Benoit Marty
1268f74420 Remove FeatureFlag.MarkAsUnread 2025-08-12 16:08:42 +02:00