* 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>
* 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>
* Move `ChangeRoles*` classes to their own module so they can be shared
* Hook the change roles screen to the leave room action, add confirmation dialogs
* Use enum instead of sealed interface for `ChangeRoomMemberRolesListType`
* Try to improve communications between nodes
* refactor (leave room) : makes sure to expose only necessary code from api module
* Add `:libraries:previewutils` module to share some test fixtures used for UI previews
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
Co-authored-by: ganfra <francoisg@matrix.org>
* Update dependency org.matrix.rustcomponents:sdk-android to v25.7.23
* Adapt to SDK changes:
- Add 'creator' role, adapt existing logic to it.
- Remove `ReplyParameters`, replace with `EventId` where possible.
- Fix changes in OIDC auth methods.
- Add more join rules.
* Make sure both creators and users with power level >= 150 are displayed as 'owners' in the room member list.
* Don't close the roles and permissions screen if the user is a creator
* Use `MediaPreviewValue.DEFAULT` for `MediaPreviewConfig.DEFAULT` too
* Improve APIs around checking roles and power levels:
- Ensure `RoomInfo.RoomPowerLevels.users` can't be directly used to check power levels since it can't check the power levels for creators.
- Add a few helper functions to handle actions that relied on the previous `users` property, and docs to explain their usages.
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Display an error dialog muting the call when a bluetooth audio device is selected on Android 11 or lower, re-enable the audio once another device is used.
- 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.
* fix(deps): update dependency androidx.compose:compose-bom to v2025.04.01
* Fix autofill deprecations
* Adapt our custom BottomSheetState and scaffold to the new APIs
* Get rid of all the custom bottom sheet implementation
It doesn't seem to be needed anymore 🎉
* Replace `semantics { invisibleToUser() }` with `hideFromAccessibility()`
* Update screenshots
* Add commit and cancel callbacks for autofill on the login view
* Fix broken tests caused mainly by https://issuetracker.google.com/issues/366255137
Add `LocalUiTestMode` composition local and helper functions.
* Remove dependency that caused a new license to need to be approved
* Let setSafeContent handle setting the value for LocalUiTestMode
* Fix broken test
* Apply fix to RoomMemberModerationViewTest and RoomListDeclineInviteMenuTest
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <android@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
* Add support for login link
https://mobile.element.io/element?account_provider=example.org&login_hint=mxid:@alice:example.org
* Update screenshots
* Reduce code duplication
* Add test on OnBoardingPresenter
* Fix tool
* Ignore login parameter if user is not allowed to connect to the provided server.
* Improve tests.
* Cleanup
* Revert change on Project.xml.
* Add documentation
* Improve LoginHelper
* Rename LoginFlow to LoginMode
Move LoginFlow to package io.element.android.features.login.impl.login
Rename some implementation of LoginMode
Rename LoginFlowView to LoginModeView
* Change launchMode of MainActivity from `singleTop` to `singleTask`
Using launchMode singleTask to avoid multiple instances of the Activity when the app is already open. This is important for incoming share and for opening the application from a mobile.element.io link.
Closes#4074
---------
Co-authored-by: ElementBot <android@element.io>
* Remove unused SUPPORT_EMAIL_ADDRESS
* Improve the callback uri format and customization.
Use io.element.android for the scheme of Oidc redirection for Element X.
For nightly the scheme will be io.element.android.nightly
For debug the scheme will be io.element.android.debug
Element Pro is using `io.element`
* Add adb tools to help with doze mode and app standby
* Add info about the device state when an error occurs in push.
* Keep more events in the DB.
* Push history: add confirmation dialog when resetting the data
* Push history: add a filter to see only the errors
* Update screenshots
* Push history: print out invalid/ignored data received.
* Increase log level for push, to make such log more visible.
It also appears that sometimes Timber.d are not present in the rageshakes.
* Log priority
* Do not include device state for invalid/ignored event.
* Fix tests.
* Fix format issue.
* Fix mistake in code blocks and do not filter when not necessary.
* Improve formatting and add missing unit test.
* Reduce nesting of blocks.
---------
Co-authored-by: ElementBot <android@element.io>
* Introduce PushHistoryService to store data about the received push
Add a push database.
* Update screenshots
* Improve preview.
* Update screenshots
* Add missing test.
* Add test for PushHistoryView
* Fix configuration issue.
Was: w: /libraries/troubleshoot/impl/src/test/kotlin/io/element/android/libraries/troubleshoot/impl/history/PushHistoryPresenterTest.kt:35:27 Cannot access class 'PushProvider' in the expression type. While it may work, this case indicates a configuration mistake and can lead to avoidable compilation errors, so it may be forbidden soon. Check your module classpath for missing or conflicting dependencies.
---------
Co-authored-by: ElementBot <android@element.io>
* 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>