Commit Graph

1215 Commits

Author SHA1 Message Date
Benoit Marty
73a6ba2849 Multi accounts - experimental first implementation (#5285)
* Multi account - Do not reset analytics store on sign out.

Else when 1 of many accounts is removed, the analytics opt in screen is displayed again.

* Multi accounts - first implementation.

* Multi accounts - Prevent user from logging twice with the same account

* Multi accounts - ignore automatic GoBack in case of error.

* Multi accounts - update first view when adding an account.

* Rename method storeData to addSession.

* Multi accounts - handle account switch when coming from a notification

* Multi accounts - handle login link when there is already an account.

* Multi accounts - handle click on push history for not current account.

* Multi accounts - improve layout and add preview.

* Add accountselect modules

* Multi accounts - incoming share with account selection

* Multi accounts - check the feature flag before allowing login using login link.

* Multi accounts - swipe on account icon

* Cleanup

* Multi accounts - fix other implementation of SessionStore

* Multi accounts - fix PreferencesRootPresenterTest

* Multi accounts - Add test on AccountSelectPresenter

* Multi accounts - Fix test on HomePresenter - WIP

* Update database to be able to sort accounts by creation date.

* Add unit test on takeCurrentUserWithNeighbors

* Fix test and improve code.

* Add exception

* Multi accounts - handle permalink

* Code quality

* Multi accounts - localization

* Fix issue after rebase on develop

* Fix issue after rebase on develop

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Update Multi accounts flag details.

* Add missing test on DatabaseSessionStore

* Add missing preview on LoginModeView

* Remove dead code.

* Add missing preview on PushHistoryView

* Document API.

* Rename API and update test.

* Remove MatrixAuthenticationService.loggedInStateFlow()

* Update screenshots

* Remove unused import

* Add exception

* Fix compilation issue after rebase on develop.

* Update screenshots

* Fix test

* Avoid calling getLatestSession() twice

* Rename `matrixUserAndNeighbors` to `currentUserAndNeighbors`

* Extract code to its own class.

* Add comment to clarify the code.

* Init current user profile with what we now have in the database.

It allows having the cached data (user display name and avatar) when starting the application when no network is available.

* Let the RustMatrixClient update the profile in the session database

* Fix test.

* When logging out from Pin code screen, logout from all the sessions.

tom

* Make PushData.clientSecret mandatory.
Also do not restore the last session as a fallback, it can lead to error in a multi account context, or even when a ghost pusher send a Push.

* Change test in RustMatrixAuthenticationServiceTest

* Do not use MatrixAuthenticationService in RootFlowNode, only use SessionStore

* Remove MatrixAuthenticationService.getLatestSessionId()

* Fix compilation issue after merging develop

* Add test on DefaultAccountSelectEntryPoint

* Fix compilation issue after merging develop

* Introduce LoggedInAccountSwitcherNode, to improve animation when switching between accounts.

* Rename Node to follow naming convention.

* Fix navigation issue after login.

* Remove unused import

* Revert "Fix navigation issue after login."

This reverts commit e409630856d7a7e741548016d7afe174ff1b40f7.

* Revert "Rename Node to follow naming convention."

This reverts commit 883b1f37c7207512d9f6605749977ad9045846a1.

* Revert "Introduce LoggedInAccountSwitcherNode, to improve animation when switching between accounts."

This reverts commit 9c698ff8152aceb5fd2b8b5ab5f609d28de64d24.

* Metro now have `@AssistedInject`.

* Update screenshots

* Introduce DelegateTransitionHandler and use it in RootFlowNode

---------

Co-authored-by: ElementBot <android@element.io>
Co-authored-by: ganfra <francoisg@element.io>
2025-09-26 15:45:06 +02:00
Jorge Martin Espinosa
f1cd80ede8 Use shared recent emoji reactions from account data (#5402)
* Use shared recent emoji reactions from account data

- Add `AddRecentEmoji` and `GetRecentEmojis` use cases to avoid injecting the whole `MatrixClient` for just one of these operations.
- Update the UI and logic of the emoji picker and message context menu to include the recent emojis.
- Add `CoroutineDispatchers.Default` with the defaults coroutines to use in the app for ease of use.

* Instead of replacing suggested emojis, concatenate recent ones removing duplicates

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-09-26 11:04:34 +00:00
renovate[bot]
644c8284e4 Update dependency org.matrix.rustcomponents:sdk-android to v25.9.25 (#5412)
* Update dependency org.matrix.rustcomponents:sdk-android to v25.9.25

* Adapt to SDK changes:

`MessageLikeEventType` is now a sealed interface and has a new `data class Other(val v1: String)` case.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2025-09-25 14:33:15 +00:00
ganfra
2a43cfec31 Merge pull request #5398 from element-hq/renovate/jna-monorepo
Update dependency net.java.dev.jna:jna to v5.18.0
2025-09-25 16:17:30 +02:00
ganfra
28bca11c03 sdk (space) : expose the via parameter from space room 2025-09-24 14:11:17 +02:00
ganfra
718b4dd11b sdk (space) : use the new space/spaceUpdate api from space list 2025-09-24 12:48:24 +02:00
Benoit Marty
461565fc9c Merge branch 'develop' into feature/fga/join_space 2025-09-24 11:20:17 +02:00
Jorge Martin Espinosa
3a3dce150a Add thread decoration with latest event details (#5355)
* Add thread decoration with latest event details
* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-09-23 14:57:50 +00:00
renovate[bot]
403238f1ca Update dependency net.java.dev.jna:jna to v5.18.0 2025-09-23 13:02:18 +00:00
ganfra
2404fbb4e5 fix (timeline) : forward pagination regression 2025-09-22 16:28:46 +02:00
Benoit Marty
b51c421e29 Introduce LoadedDetails, different for Room and Space. 2025-09-22 16:26:33 +02:00
Benoit Marty
a25797dfd3 Code cleanup 2025-09-22 14:59:43 +02:00
renovate[bot]
b3d1cabb66 Update dependency org.matrix.rustcomponents:sdk-android to v25.9.19 (#5377)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-19 15:53:02 +00:00
ganfra
5cda6730c4 Merge branch 'develop' into feature/fga/join_space 2025-09-19 16:35:55 +02:00
Jorge Martin Espinosa
fa64db56e7 Add logs to detect duplicates in the room list (#5364)
* Add logs to detect duplicates in the room list

* Add comments and helper class about the caching results logging
2025-09-19 14:24:06 +00:00
Benoit Marty
37d036cb12 Remove MatrixAuthenticationService.getLatestSessionId() 2025-09-19 10:57:26 +02:00
Benoit Marty
8ece6afb23 Change test in RustMatrixAuthenticationServiceTest 2025-09-19 10:57:22 +02:00
Benoit Marty
d9755234dc Remove MatrixAuthenticationService.loggedInStateFlow() 2025-09-19 10:57:20 +02:00
Benoit Marty
06bcbb8bb8 Rename method storeData to addSession. 2025-09-19 10:57:17 +02:00
Benoit Marty
595cec7d33 Merge branch 'develop' into feature/bma/testEntryPoint 2025-09-18 18:58:30 +02:00
Benoit Marty
6ad8be2b12 Merge pull request #5306 from element-hq/feature/bma/removeDeadCode
Remove dead code
2025-09-18 18:11:06 +02:00
Valere
ac16dda470 fix the tests 2025-09-18 14:32:01 +02:00
Valere
d5983a33c2 fix Conflicting import 2025-09-18 12:25:28 +02:00
Valere
f9fa38f229 refactor: rename CallNotify to RtcNotification to match new event 2025-09-18 09:25:13 +02:00
Valere
9c11444cc7 bump rust component version 2025-09-17 15:28:48 +02:00
Valere
5221f0890c Use the new RtcNotification instead of deprecated CallNotify 2025-09-17 15:15:33 +02:00
Benoit Marty
629fc552e5 Use DependencyHandlerScope.testCommonDependencies() 2025-09-16 14:38:31 +02:00
Benoit Marty
fecb8cb0be Cleanup nodes (#5358)
* Remove unused NavTarget.Empty

* Let SpaceEntryPoint.Inputs implement NodeInputs.

* Small cleanup

* Small cleanup

* Method can be private.

* Simplify code

* Rename to follow naming convention

* Rename Node to follow naming convention

* Add Konsist test.

* Remove useless line of code.
2025-09-16 14:36:43 +02:00
Benoit Marty
c286c60c30 Remove useless line of code. 2025-09-16 12:27:27 +02:00
Valere Fedronic
2ca0afff3a Call: MSC4310 sending RTC decline event and listening for Decline from other sessions
MSC4310 RTC decline event support
2025-09-16 10:25:17 +02:00
ganfra
f675c95740 feature (space) : start logic for joining space 2025-09-15 16:26:54 +02:00
Jorge Martin Espinosa
15a99a5f0c Upgrade Rust SDK bindings to v25.09.15 (#5353)
* Upgrade Rust SDK bindings to `v25.09.15`:

This contains important changes to the APIs used to build the EC widget.

* Use the new `intent` parameter correctly, by calculating locally its behaviour based on whether the room is a DM and there is an ongoing call or not.

Using just the `intent` parameter is our end goal, but sadly this is not fully supported by the current EC embedded `v0.15.0`, so we need to add a workaround using the `skipLobby` and `preload` parameters.
2025-09-15 15:15:10 +02:00
Benoit Marty
06e7bc1604 Space list (#5320)
* feature(spaces) : introduce SpaceRoomList matrix api

* feature (space) : extract SpaceRoomItemView

* feature(spaces) : start introducing SpaceScreen

* feature (space) : iterate on space list (and space screen)

* feature (space) : add space cache and navigation to sub space/room

* feature (space) : display top bar title

* Code cleanup, remove dead code and fix compilation issue

* More compilation fixes.

* Update screenshots

* Fix test compilation issues.

* Introduce MatrixClient.rememberHideInvitesAvatar() extension to reduce code duplication.

* Add test on SpacePresenter

* Add test on SpaceRoomCache and fix implementation

* Iterate on SpaceRoomCache thanks to SpaceRoomCacheTest

* Add UT on SpaceListUpdateProcessor

* Fix quality issue.

* Add tests on RustSpaceRoomList

---------

Co-authored-by: ganfra <francoisg@matrix.org>
Co-authored-by: ElementBot <android@element.io>
2025-09-11 17:29:15 +02:00
Benoit Marty
d06c9de08c Use .value instead of .toString(). 2025-09-11 17:04:58 +02:00
Benoit Marty
b1e6ab17c0 Add tests on RustSpaceRoomList 2025-09-11 15:05:50 +02:00
Valere
4e8e355f27 Call: RTC decline event support 2025-09-11 13:33:37 +02:00
Benoit Marty
137dc3bf25 Add UT on SpaceListUpdateProcessor 2025-09-11 09:57:18 +02:00
Benoit Marty
637c58ff3d Add a TODO 2025-09-11 09:02:43 +02:00
Benoit Marty
2e5a042774 SDK API change: handle change on VirtualElementCallWidgetOptions 2025-09-11 08:58:36 +02:00
Benoit Marty
cd830266ca normalizedPowerLevel has been removed from the SDK (and was not used). 2025-09-11 08:52:02 +02:00
ganfra
00d07f970a Iterate on SpaceRoomCache thanks to SpaceRoomCacheTest 2025-09-10 21:42:25 +02:00
Benoit Marty
54daa6251c Add test on SpaceRoomCache and fix implementation 2025-09-10 18:18:16 +02:00
Benoit Marty
d7c6cbc78c Code cleanup, remove dead code and fix compilation issue 2025-09-10 14:47:07 +02:00
ganfra
65961ad404 feature (space) : add space cache and navigation to sub space/room 2025-09-10 14:31:44 +02:00
ganfra
6b9afd9e6f feature (space) : iterate on space list (and space screen) 2025-09-10 14:30:10 +02:00
ganfra
2fe56f834f feature(spaces) : start introducing SpaceScreen 2025-09-10 14:28:55 +02:00
ganfra
f56ccdc786 feature(spaces) : introduce SpaceRoomList matrix api 2025-09-10 14:25:17 +02:00
Benoit Marty
a570b0d4ff Remove unused MatrixClient.availableSlidingSyncVersions(). 2025-09-09 15:19:19 +02:00
Benoit Marty
ff84e15ec7 Fix RustMatrixClientTest 2025-09-05 17:09:43 +02:00
Benoit Marty
cd4c765143 Code quality 2025-09-05 17:09:43 +02:00