* 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>
* Update metro to v0.6.7
* Replace `@Inject` with `@AssistedInject` where needed
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
- Do not reset the analytics store, so that we do not ask the user consent again => Parity with iOS.
- Do not reset the permission store, because it contains information that's related to the system permission, which cannot be retrieved otherwise => Should help with #3195.
It used to be before "Sign out" which once the developer setting was
enabled went over the build version. So clicking 8 times on the build
version instead of 7 to enable dev settings was signing out the user.
* Add `VideoCompressorPreset` enum
This represents the different compression presets used for processing videos before uploading them
* Add `VideoCompressorHelper` util class to calculate the scaled output size of the video given an input size and its optimal bitrate
Also add `MediaOptimizationConfig` which will be used to decide how to apply compression in `MediaPreProcessor`
* Add `RustMatrixClient.getMaxFileUploadSize()` function and `MaxUploadSizeProvider` so we can import only this functionality into other components
* Try preloading the max file upload size the first time we get network connectivity - it's a best effort
This should help ensure we'll have this value available later, even if we still need to load it asynchronously.
* Split the `compressMedia` preference into `compressImages` and `compressMediaPreset`
* Modify the media processing parts to use the new classes and utils
* Add `MediaOptimizationSelectorPresenter`, which will retrieve the compression values and the max file upload size, also estimating the compressed video file sizes if needed.
* Add a feature flag to allow selecting the media upload quality per upload
* Integrate the previous changes with the attachments preview screen
Add strings from localazy too.
* Adapt the rest of the app calls to upload media to using the media optimization configs
* Allow modifying the default compression values in advanced settings, based on the feature flag value
* Pass the `fileSize` in `MediaUploadInfo` too, to be able to check it against the `maxUploadSize`
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
- Add `runCatchingExceptions` and `mapCatchingExceptions` to replace `runCatching` and `mapCatching`.
- Make `tryOrNull { ... }` catch only exceptions too.
- Apply the changes to the whole project.
- Add new Rust fakes for tests to handle the code that's now unblocked - previously it just threw an `UnsatisfiedLinkError` which we ignored.
- Add a new `detekt-rules` project with a `RunCatchingRule` to prevent `runCatching` and `mapCatching` usages.