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.
* 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>
* 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>
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.
* 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>
* 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>
* Enforce mandatory session verification only for new logins
- Creates `AppMigration` base interface as a way to isolate migration logic, app migrations must implement this interface.
- Creates `AppMigration01` with the existing logs removal migration and `AppMigration02` with the logic to allow existing sessions to skip verification.
- Add `DefaultSessionPreferencesStoreFactory.remove(sessionId)` to allow a ephemeral session store access to exist outside the `SessionScope` for this new migration.
* Fix tests
* Add more tests.
This also includes creating several abstractions.
* Review changes.
- Make `orderedMigrations` a class property, `migrations` just a constructor parameter to avoid incorrect usages.
- Create `lastMigration` property too, use it instead of `MIGRATION_VERSION`.
* Always display 'lost recovery key?' option
* Use `isLastDevice` it to display only 'enter recovery key' option for verification.
* Update strings. This should fix the wrong term 'passcode' being used in the recovery key screen title.
* Disable 'lost your recovery key?' button while the screen is in a loading state
* Update screenshots
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
* Remove `SessionData.needsVerification` as the source of truth for session verification status.
- Use the Rust SDK `EncryptionService.verificationState()` instead, but always waiting for the first 'known' result (either verified or not, discarding 'unknown').
- Add a workaround in the super rare case when reading this value gets stuck somehow. We'll assume the user is not verified in that case.
- Make `DefaultFtueService.getNextStep` and dependent checks `suspend`.
- Make the `skip` button use a value in the session preferences instead.
* Log exception when the verification status can't be loaded
Co-authored-by: Benoit Marty <benoit@matrix.org>
* Fix review comments
---------
Co-authored-by: Benoit Marty <benoit@matrix.org>