Commit Graph

159 Commits

Author SHA1 Message Date
Benoit Marty
7f60fde9dc Remove default param for Avatar.avatarType 2025-06-23 21:36:53 +02:00
ElementBot
f32495ee58 Sync Strings from Localazy (#4842)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-06-11 14:13:33 +02:00
Benoit Marty
03e23477b7 Fix coroutine scope (#4820)
* Inject the session scope instead of the application scope where it's possible.

* Create AppCoroutineScope annotation to let developers explicitly choose the appropriate CoroutineScope when injecting one.
2025-06-04 15:33:51 +00:00
ElementBot
5a8919b6e3 Sync Strings from Localazy (#4804)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-06-02 12:05:08 +02:00
Benoit Marty
0b5e816f0d Cleanup testImplementation dependencies (#4790) 2025-06-02 10:51:02 +02:00
ElementBot
498cf15d38 Sync Strings (#4775) 2025-05-30 08:47:39 +00:00
Benoit Marty
e8e75af506 Update "Learn more" link (#4686)
* Update target link for "Learn more".

* Rename VerifySelfSession* to OutgoingVerification*

* Optimize import

* Refactor to avoid long line

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-05-09 11:10:30 +02:00
ElementBot
76c59e2eac Sync Strings from Localazy (#4648)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-04-28 10:59:35 +02:00
ElementBot
270b420575 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
77a7c0b2e5 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
6dbb371ca2 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
b91933625c 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
9456ee921d Sync Strings from Localazy 2025-03-10 00:28:38 +00:00
bmarty
7fca7d2b12 Sync Strings from Localazy 2025-03-03 00:29:16 +00:00
bmarty
3dddd90d97 Sync Strings from Localazy 2025-02-17 00:30:17 +00:00
bmarty
5a4cac7d2d Sync Strings from Localazy 2025-02-03 00:29:01 +00:00
Benoit Marty
05fc76822a 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
c8c7e6c692 Fix wrong name. 2024-11-29 15:18:09 +01:00
ElementBot
411895456b 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
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
Jorge Martin Espinosa
f8cdd0a712 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
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
Benoit Marty
08673f44ce Use backgroundScope 2024-10-07 17:46:19 +02:00
bmarty
05291bcf2f Sync Strings from Localazy 2024-10-07 00:28:33 +00:00
renovate[bot]
d67fae8d4c 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
2efdb3ae45 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
2b016227e9 Migrate license to AGPL.
Run script `uv run license-editor --repository ../element-x-android`
2024-09-06 17:19:19 +02:00
Benoit Marty
ec4f2dcfbf Properly skip the FTUE verification screen if verification is not needed. 2024-09-04 16:41:34 +02:00
SpiritCroc
02dbaab3d5 Fix login navigation getting stuck with no-op analytics provider
Change-Id: Icac04e1193e12943c2b8598f48d79ac6e7cef3a5
2024-08-24 22:22:10 +02:00
bmarty
5765d9bf9f Sync Strings from Localazy 2024-08-19 00:25:36 +00:00
Jorge Martín
e16057a366 Initial implementation of the reset identity feature 2024-08-13 08:55:05 +02:00
bmarty
d288ace4bd Sync Strings from Localazy 2024-07-29 00:26:27 +00:00
ElementBot
9522569860 Sync Strings (#3232)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2024-07-22 08:59:47 +00:00
Benoit Marty
18e6304e0a Fix test compilation 2024-07-08 17:49:39 +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
8dae7f2f69 Use session coroutine scope instead of application coroutine scope. 2024-07-08 16:47:17 +02:00
jmartinesp
58f2cbf489 Sync Strings from Localazy 2024-07-03 11:21:27 +00:00
Jorge Martin Espinosa
950e502ca6 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
16545ce60e 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
038b60a271 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
feef0f6976 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
f1229c582d Create test module with FakeFtueService 2024-06-17 15:12:08 +02:00
Benoit Marty
cb07ccdeb9 Add test on DefaultFtueService.reset(). 2024-06-17 15:04:20 +02:00
Benoit Marty
2b062f217b Rename method and val. 2024-06-17 14:56:56 +02:00
Benoit Marty
6a7d6fa631 Fix wrong dependency.
implementation -> testImplementation
2024-06-14 10:29:59 +02:00
bmarty
57510316ec Sync Strings from Localazy 2024-06-10 00:17:04 +00:00
Benoit Marty
b3b58f14d7 Remove strings screen_qr_code_login_.* from the ftue module. 2024-06-04 09:42:00 +02:00
bmarty
f501f27d27 Sync Strings from Localazy 2024-06-03 00:24:07 +00:00