Commit graph

149 commits

Author SHA1 Message Date
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
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
ElementBot
17193ad35a
Sync Strings from Localazy (#4421)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-03-17 09:54:03 +01:00
Jorge Martin Espinosa
f73c0e42a4
Implement user verification (#4294)
* Add support for starting verification of a user

* Add support for replying to incoming user verification requests

* Add reset recovery key button and previews to `ChooseSelfVerificationModeView`

* Add 'Profile' item in room details screen

* Update screenshots

* Remove `showDeviceVerifiedScreen` parameter from `NavTarget.UseAnotherDevice`

* Allow exiting the FTUE flow, which will close the app. The previous state will be restored when the app is reopened.

* When outgoing verification fails, move to the `Canceled` state. Then, when resetting the state machine state also reset the verification service.

---------

Co-authored-by: ElementBot <android@element.io>
2025-03-10 11:20:17 +01:00
bmarty
9a75f40855 Sync Strings from Localazy 2025-03-10 00:28:38 +00:00
bmarty
46acf414c1 Sync Strings from Localazy 2025-03-03 00:29:16 +00:00
bmarty
f549e7bba2 Sync Strings from Localazy 2025-02-17 00:30:17 +00:00
bmarty
be91da966a Sync Strings from Localazy 2025-02-03 00:29:01 +00:00
Benoit Marty
97f3be3dc5 Apply dual licenses: AGPL + Element Commercial to file headers.
2 replace all actions have been performed:
- "SPDX-License-Identifier: AGPL-3.0-only" to "SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial"
- "Please see LICENSE in the repository root for full details." to "Please see LICENSE files in the repository root for full details."
2025-01-07 10:05:04 +01:00
Benoit Marty
350a47cc22 Fix wrong name. 2024-11-29 15:18:09 +01:00
ElementBot
bc59a70043
Sync Strings - add translations to Finnish (#3883)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2024-11-18 11:37:17 +00:00
Jorge Martin Espinosa
2206e940bc
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
Jorge Martin Espinosa
057ef38644
Fix the onboarding flow getting stuck in some cases (#3778)
This was caused by several `DefaultFtueService` instances being created and only the latest one receiving new state updates while the `LoggedInFlowNode` which decides the navigation was stuck subscribed to the initial one. `DefaultFtueService` has now been marked as s singleton to fix this.
2024-10-31 10:55:17 +00:00
Benoit Marty
b8b38208f4 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
b179518962 Sync Strings from Localazy 2024-10-21 00:27:20 +00:00
Benoit Marty
b60d7ba54a Use backgroundScope 2024-10-07 17:46:19 +02:00
bmarty
e25ba65170 Sync Strings from Localazy 2024-10-07 00:28:33 +00:00
renovate[bot]
98d9abecd9
fix(deps): update dependency io.nlopez.compose.rules:detekt to v0.4.15 (#3595)
* Update dependency io.nlopez.compose.rules:detekt to v0.4.15

* Fix new detekt issues

* Fix KtLint

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2024-10-04 16:58:19 +02:00
Jorge Martin Espinosa
eeec7cc785
Centralise the DI code generation logic (#3562)
* Create Anvil extension helper

* Use the helper everywhere
2024-09-30 12:20:28 +00:00
Benoit Marty
f61df38e55 Migrate license to AGPL.
Run script `uv run license-editor --repository ../element-x-android`
2024-09-06 17:19:19 +02:00
Benoit Marty
f32e7c7e02 Properly skip the FTUE verification screen if verification is not needed. 2024-09-04 16:41:34 +02:00
SpiritCroc
107b29545d Fix login navigation getting stuck with no-op analytics provider
Change-Id: Icac04e1193e12943c2b8598f48d79ac6e7cef3a5
2024-08-24 22:22:10 +02:00
bmarty
3e67448006 Sync Strings from Localazy 2024-08-19 00:25:36 +00:00
Jorge Martín
4ab0b1074d Initial implementation of the reset identity feature 2024-08-13 08:55:05 +02:00
bmarty
76804d9e48 Sync Strings from Localazy 2024-07-29 00:26:27 +00:00
ElementBot
1f01bd73c4
Sync Strings (#3232)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2024-07-22 08:59:47 +00:00
Benoit Marty
5ccf95018d Fix test compilation 2024-07-08 17:49:39 +02:00
Benoit Marty
e48b958d52 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
fbe70ddf5d Use session coroutine scope instead of application coroutine scope. 2024-07-08 16:47:17 +02:00
jmartinesp
dabaa2d265 Sync Strings from Localazy 2024-07-03 11:21:27 +00:00
Jorge Martin Espinosa
b0cebf5ca0
Improve screenshot testing with ComposablePreviewScanner (#3125)
* Use ComposablePreviewScanner to rework how screenshot testing works
* Add test sharding
* Update screenshots
* Fixes for Element Gallery

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2024-07-03 13:05:06 +02:00
Jorge Martín
f421f94639 Fix session verification incorrectly displaying as 'not verified' when the user opened the app with no network connection.
It turns out `encryptionService.verificationState()` runs a network request that will cause a deadlock when it fails.

Also fixed another deadlock that caused the screen to remain blank sometimes after logging in, because DataStore got stuck when checking the `skipVerification` state for some reason I don't fully understand.
2024-06-28 11:35:08 +02:00
Benoit Marty
849f64f4aa
Merge pull request #3044 from element-hq/feature/bma/testDefaultClearCacheUseCase
Add test on DefaultClearCacheUseCase
2024-06-18 10:27:45 +02:00
Jorge Martin Espinosa
b741c32e91
Add full screen intent permissions banner (#3024)
* Add full screen intent permissions banner, creating `:libraries:fullscreenintent` modules.
* Add it to notification settings too:
    - Create `libraries:fullscreenintent` modules for the permission presenter and associated data.
    - Add the presenter and states to `NotificationSettingsPresenter` and `NotificationSettingsView`.
* Use the right API to check for full screen intent permissions.
- Use the right package name for `:libraries:permission` contents.
* Fix broken tests (flaky?)
* Ignore coverage verification for fake and small presenters

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-06-18 07:41:10 +00:00
Benoit Marty
b68b08300a Add test on DefaultFtueService.reset(). 2024-06-17 15:04:20 +02:00
Benoit Marty
03a197e530 Rename method and val. 2024-06-17 14:56:56 +02:00
Benoit Marty
7c18133bb3 Fix wrong dependency.
implementation -> testImplementation
2024-06-14 10:29:59 +02:00
bmarty
f3d286911c Sync Strings from Localazy 2024-06-10 00:17:04 +00:00
Benoit Marty
aec579d757 Remove strings screen_qr_code_login_.* from the ftue module. 2024-06-04 09:42:00 +02:00
bmarty
66636ea967 Sync Strings from Localazy 2024-06-03 00:24:07 +00:00
Jorge Martin Espinosa
c8bd04ceb1
Sign in with QR code (#2793)
* Add QR code login.
* Add FF to disable it in release mode.
* Force portrait orientation on the login flow.
* Create `NumberedList` UI components.
* Improve camera permission dialog.
* Make nodes in qrcode feature use `QrCodeLoginScope` instead of `AppScope`
* Bump SDK version.
* Fix maestro tests

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-05-31 14:38:27 +02:00
Benoit Marty
ade3b5de4f Fix naming issue. 2024-05-31 10:20:43 +02:00
Benoit Marty
3fa508f1fe Add Konsist test Class with 'ContributeBinding' annotation should have allowed prefix and fix exissting issues.
Also remove annotation `DefaultPreferences`, we only have one implementation.
2024-05-31 10:18:08 +02:00
Benoit Marty
ec8cb2e32f Change Test class suffix. 2024-05-30 10:11:18 +02:00
Benoit Marty
f5a0e83cb2
Merge pull request #2941 from element-hq/sync-localazy
Sync Strings
2024-05-29 16:27:17 +02:00
bmarty
ca5bc71057 Sync Strings from Localazy 2024-05-29 12:44:57 +00:00
Benoit Marty
37d9a9f5a9 Lambda parameters in a composable function should be in present tense, not past tense.
https://mrmans0n.github.io/compose-rules/rules/#naming-parameters-properly
2024-05-29 12:18:23 +02:00
Benoit Marty
3a39e2a3ec
Merge pull request #2921 from element-hq/sync-localazy
Sync Strings
2024-05-27 15:52:38 +02:00
Benoit Marty
b3e0f6e843 Translations: pt -> pt-rBR 2024-05-27 14:51:32 +02:00
Benoit Marty
1988c4c4da Sync string again (fix lint issue) 2024-05-27 14:47:14 +02:00