Commit Graph

335 Commits

Author SHA1 Message Date
Jorge Martin Espinosa
49e1cfed42 Fix verification failed issue, simplify verification logic (#3830)
* Simplify session verification:

- Reuse Rust `Client` instances created on the login process so we don't need to restore one right before the session verification.
- Remove unnecessary sources of verification state updates.
- Add an intermediate FTUE flow step which will display an indeterminate progress indicator instead of a blank screen.

* Remove unnecessary workaround: the SDK should already handle this

* Add regression tests for noop analytics service usage.

* Add `services.analytics.noop` module to the test dependencies

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2024-11-08 16:42:27 +01:00
bmarty
fed502957b Sync Strings from Localazy 2024-11-04 00:27:46 +00:00
Benoit Marty
e95613f3fe Merge pull request #3750 from element-hq/feature/bma/cryptoIteration
UI iteration on the encryption settings
2024-10-30 11:11:35 +01:00
Benoit Marty
fe16a29283 Crypto: iterate on wording, UI and UX.
Change wording of setup recovery key banner and change target to root.
Iterate on wording of encryption screen.
Change button to Switch.
Iterate on wording to delete key storage.
Iterate on wording and icon on the root setting.
Remove confirmation dialog when disabling backup.
Add subtitle to change recovery key action.
Enable key storage directly, remove quite empty screen to setup the backup.
Disable recovery action if key backup is disabled.
2024-10-29 14:54:59 +01:00
Benoit Marty
d1b3ecab36 Incoming session verification request
Add more log to the state machines
Ensure the block cannot be cancelled, else if the Rust SDK emit a new state during the API execution, the state machine may cancel the api call.
Let VerificationFlowState values match the SDK api for code clarity.
Rename sub interface for clarity.
Migrate tests to the new FakeVerificationService.
2024-10-29 09:26:15 +01:00
bmarty
f19ea02390 Sync Strings from Localazy 2024-10-21 00:27:20 +00:00
Jorge Martin Espinosa
e44b5ad98d Upgrade Kotlin to v2.0 (#3594)
* Bump Kotlin to v2.0

* Fix lots of issues due to the upgrade: lint issues, function signature incompatibilities, broken tests, etc.

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2024-10-10 08:32:00 +00:00
ganfra
bd59d115e6 misc : rework getRoomInfoFlow (by using getRoomSummaryFlow) 2024-10-08 21:36:38 +02:00
Benoit Marty
c709b8d76e Remove dependencies to other presenters from RootPresenter 2024-10-07 17:45:16 +02:00
bmarty
05291bcf2f Sync Strings from Localazy 2024-10-07 00:28:33 +00:00
bmarty
3f359d7f0a Sync Strings from Localazy 2024-09-30 00:26:52 +00:00
bmarty
a064fb4fab Sync Strings from Localazy 2024-09-23 00:23:49 +00:00
bmarty
97cf19cb71 Sync Strings from Localazy 2024-09-17 11:05:35 +00:00
bmarty
e0c24c0f1c Sync Strings from Localazy 2024-09-16 18:40:24 +00:00
Jorge Martin Espinosa
03786c1fd2 Add forced logout flow when the proxy is no longer available (#3458)
* Add `MatrixClient.isSlidingSyncProxySupported` function

* Update localazy strings

* Modify `ErrorDialog` to have an `onSubmit` call, which will be used for the submit action.

Also make the title text optional and dismissing the dialog by tapping outside/going back configurable.

* Check if a forced migration to SSS is needed because the proxy is no longer available.

In that case, display the non-dismissable dialog and force the user to log out after enabling SSS.

* Enable native/simplified sliding sync by default.

* Refactor the login to make sure we:

1. Always try native/simplified sliding sync login first, if available.
2. Then, if it wasn't available or failed with an sliding sync not supported error, try with the proxy instead (either discovered proxy or forced custom one).

* Move logic to `LoggedInPresenter` and the UI to `LoggedInView`

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-09-16 09:13:02 +00:00
Jorge Martin Espinosa
8154aa3319 Add banner for optional migration to simplified sliding sync (#3429)
* Add banner for optional migration to native sliding sync

- Add `MatrixClient.isNativeSlidingSyncSupported()` and `MatrixClient.isUsingNativeSlidingSync` to check whether the home server supports native sliding sync and we're already using it.
- Add `NativeSlidingSyncMigrationBanner` composable to the `RoomList` screen when the home server supports native sliding sync but the current session is not using it.
- Add an extra logout successful action to the logout flow, create `EnableNativeSlidingSyncUseCase` so it can be used there.

* Update screenshots

* Make sure the sliding sync migration banner has lower priority than the encryption setup ones

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-09-09 18:13:19 +02:00
Benoit Marty
2b016227e9 Migrate license to AGPL.
Run script `uv run license-editor --repository ../element-x-android`
2024-09-06 17:19:19 +02:00
ganfra
a37a6d249f Pinned messages list : improve and fix code after PR review. 2024-09-05 17:40:50 +02:00
ganfra
ff3646ead0 Pinned messages: clean code 2024-09-04 14:27:18 +02:00
ganfra
9936dbc464 Merge branch 'develop' into feature/fga/pinned_messages_list 2024-09-04 14:11:53 +02:00
ganfra
faae2d1004 Pinned messages list : navigation from room details 2024-09-03 09:41:30 +02:00
ganfra
a4e0428403 Pinned events : better navigation from ViewInTimeline or permalink 2024-08-30 18:28:45 +02:00
Benoit Marty
f0c2229621 Add banner entry point to set up recovery 2024-08-29 18:34:55 +02:00
Jorge Martín
0ddadd8c5a Fix lint issues 2024-08-13 08:55:06 +02:00
Jorge Martín
d5c2e5e436 Extract OIDC to its own module 2024-08-13 08:55:05 +02:00
Benoit Marty
94f38f1af5 Rework FakeMatrixRoom so that it contains only lambdas. (#3229)
* Upgrade lint to 8.7.0-alpha01

* FakeMatrixRoom: lambda everywhere

Fix test compilation issues
2024-07-22 10:39:48 +02:00
renovate[bot]
8a2335f7aa Update dependency org.matrix.rustcomponents:sdk-android to v0.2.33 (#3220)
* Update dependency org.matrix.rustcomponents:sdk-android to v0.2.33

* Fix API breaks

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2024-07-19 13:33:27 +02:00
Benoit Marty
a83c5d4bd7 When clearing cache, ensure that SessionPreferencesStore is removed from the cache.
Fixes blank screen after clear cache.
Also cleanup the codebase.
2024-07-08 16:48:40 +02:00
Benoit Marty
775cb89993 Fix image not rendering after clearing cache. 2024-06-24 13:58:15 +02:00
ganfra
e93a41a5b5 Merge branch 'develop' into feature/fga/sending_queue_iteration 2024-06-19 13:54:24 +02:00
ganfra
f98441c74d Sending queue : change a bit the logic to re-enable sending queue. 2024-06-19 12:56:04 +02:00
Benoit Marty
ff51a90ee6 Typo 2024-06-19 09:10:41 +02:00
Benoit Marty
f2da62160b Ensure that process recreation also use the restoreMutex 2024-06-18 18:33:04 +02:00
Benoit Marty
1bf27aad3e Also fix same issue for analytics. 2024-06-18 11:08:25 +02:00
Benoit Marty
e44de15f94 Iterate on sessionVerificationService.sessionVerifiedStatus and fix tests. 2024-06-18 11:02:19 +02:00
Benoit Marty
ff40b095fe Rather use NoDistributorsAvailable, it has more chance to happen IRL. 2024-06-17 18:03:00 +02:00
Benoit Marty
6ea0fc8d17 Add test about selecting the first provider with a distributor. 2024-06-17 17:54:55 +02:00
Benoit Marty
618c351f9f Fix test issue. 2024-06-17 17:49:01 +02:00
Benoit Marty
ff201c6412 Fix test compilation issue. 2024-06-17 17:38:10 +02:00
Benoit Marty
622cc35616 Store the first provider even if no distributor is available, else error in troubleshoot test will not be accurate.
Also when registering for the first time, pick the fist available provider with at least one distributor.
2024-06-17 17:36:39 +02:00
Benoit Marty
2e8b63c006 Add a shortcut to navigate to the notification settings in case of error. 2024-06-17 16:29:10 +02:00
Benoit Marty
366d6c017d Add ability to not show the pusher registration again. 2024-06-17 11:38:32 +02:00
Benoit Marty
e6f6e82ce2 Render an error dialog in case registering a pusher fails. 2024-06-17 11:30:23 +02:00
Benoit Marty
f7b8e0c931 Add pusher status in the state.
It improve the tests and we may want to render errors in the View at some point.
2024-06-17 11:30:23 +02:00
Benoit Marty
3eaf780087 Add test on pusher registration 2024-06-17 11:30:22 +02:00
Benoit Marty
9097d73f38 More log. 2024-06-17 11:30:22 +02:00
Benoit Marty
cf2c8dfe3b Add Timber tag. 2024-06-17 11:30:21 +02:00
Benoit Marty
122841a026 Ensure that the code is not run twice. 2024-06-17 11:30:21 +02:00
Benoit Marty
cb8bd077da Extract function and add more logs. 2024-06-17 11:30:21 +02:00
Benoit Marty
209d4f8fe0 Pusher add more log and change comment to log. 2024-06-17 11:30:20 +02:00