Commit Graph

666 Commits

Author SHA1 Message Date
Benoit Marty
0a4a4e20db Merge pull request #5160 from element-hq/feature/bma/cleanupFeatureFlags
Remove old feature flags
2025-08-12 18:21:44 +02:00
Jorge Martin Espinosa
12ea2064c7 Provide calculated server names when opening a room from another (#5155)
* Provide calculated server names when opening a room from another, based on the most frequently used domain names in the user ids for the users in the room.

This helps when following permalinks or navigating to the successor room of a tombstoned one. Previously, the `/summary` endpoint was failing because no server names were used in the `via` parameters.
2025-08-12 15:17:46 +00:00
Benoit Marty
a0629d03fd Remove FeatureFlag.MediaGallery 2025-08-12 16:08:45 +02:00
Benoit Marty
3a14fcdc0d Remove FeatureFlag.PinnedEvents 2025-08-12 16:08:44 +02:00
Benoit Marty
0eadf275e1 Remove FeatureFlag.NotificationSettings and FeatureFlag.PinUnlock 2025-08-12 16:08:40 +02:00
Jorge Martin Espinosa
a170d80cb3 Add media file limit size warning and media quality selection (#5131)
* 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>
2025-08-11 17:22:46 +02:00
ElementBot
badbc5189e Sync Strings (#5146)
* Sync Strings from Localazy

* Remove unused WelcomeView.

* Remove unused WelcomeView.

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-08-11 12:49:29 +00:00
Benoit Marty
4a6765db20 Merge pull request #5120 from element-hq/feature/bma/a11y/contextMenuKeyboard
[a11y] Open context menu with the keyboard
2025-08-06 14:50:12 +02:00
Jorge Martin Espinosa
2a42a71490 Reload room member list when active members count changes (#5129) 2025-08-06 10:37:52 +00:00
Jorge Martin Espinosa
955263bee1 Force last owner of a room to pass ownership when leaving (#5094)
* 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>
2025-08-05 17:24:14 +02:00
Benoit Marty
3a97bff95a Cleanup: The local inspection mode is handled in ModalBottomSheet. 2025-08-04 16:37:43 +02:00
Benoit Marty
aae24e01ef Sync string again 2025-08-04 14:50:08 +02:00
bmarty
a2c8107b44 Sync Strings from Localazy 2025-08-04 00:34:11 +00:00
Jorge Martin Espinosa
8298404630 Adapt 'change roles' screens to the new creator/owner role (#5076)
* Replace `RoomMember.Role.CREATOR` with `RoomMember.Role.Owner` - Make `RoomMember.Role` a sealed interface instead

* Adapt room member role mapping to include the power level to distinguish between admins and owners

* Use new `RoomMember.Role` sealed interface through the app

* Change how `MembersByRole` groups members to add owners to the admins section

* Adapt the `ChangeRoles` screen to the new roles:
    - Owners can't modify other owner's roles.
    - They can modify the roles of any other user, without confirmation.

* Adapt 'roles and permissions' screen:
    - Owners can't demote themselves.
    - The admin count also counts owners.

* Add more tests and screenshots

* Add owners to its own section in the 'change roles' screen

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-07-29 14:07:16 +00:00
bmarty
0d0e958bd4 Sync Strings from Localazy 2025-07-28 00:33:43 +00:00
renovate[bot]
58e1503e61 Update dependency org.matrix.rustcomponents:sdk-android to v25.7.23 (#5073)
* 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>
2025-07-24 11:58:30 +02:00
bmarty
fcacfa87c1 Sync Strings from Localazy 2025-07-14 00:33:09 +00:00
Benoit Marty
00a00ecbe4 Fix test 2025-07-10 11:40:38 +02:00
ElementBot
1944004409 Sync Strings from Localazy (#4983)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-07-04 14:37:59 +00:00
Benoit Marty
4afc20798c [a11y] Ensure that heading() is applied to all screen titles. 2025-07-04 12:15:42 +02:00
Benoit Marty
70c07f0076 [a11y] Use built-in onClickLabel parameter. 2025-07-04 09:34:13 +02:00
Benoit Marty
ef9dc70aec Merge pull request #4960 from element-hq/feature/bma/minApiLevel
Update min api level to 33 for Element enterprise
2025-07-01 09:07:16 +02:00
Benoit Marty
c843faff3a Add "View avatar" content description to all clickable Avatar that will open the avatar preview. (#4948)
* Add "View avatar" content description to all clickable Avatar that will open the avatar preview.

* Improve accessibility of avatar images.
2025-06-30 17:06:10 +02:00
Benoit Marty
2234cab0c7 Fix test regression on API 33. 2025-06-30 17:01:00 +02:00
bmarty
2e8f8ec057 Sync Strings from Localazy 2025-06-30 00:33:54 +00:00
renovate[bot]
a10db58872 fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.6.25 (#4936)
Fix broken API changes:
- `RoomInfo.isPublic` is now optional, so we need to assume its default value in some places of the app.
- `RoomInfo.userPowerLevels` is now `RoomInfo.roomPowerLevels` and also contains this info.
- `ClientBuilder` now uses a `DecryptionSettings` value.
- The call widget settings provider now internally uses a different Rust type.
- `Client.clearCache` now takes a `syncService` so it can stop it.

---

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2025-06-25 19:25:42 +00:00
Benoit Marty
5a5195351d Merge pull request #4923 from element-hq/feature/bma/spaceAvatar2
Iterate on avatar to be able to render Space avatar Part2
2025-06-24 12:05:59 +02:00
renovate[bot]
eb9204e31f fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.6.23 (#4917)
* fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.6.23

* Fix API break.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-06-24 11:23:20 +02:00
Benoit Marty
7f60fde9dc Remove default param for Avatar.avatarType 2025-06-23 21:36:53 +02:00
Benoit Marty
8df920a3ac Introduce AvatarType to be able to render space avatars 2025-06-23 17:08:14 +02:00
Benoit Marty
1af5fe8c9b Suppress LargeClass on test. 2025-06-20 10:33:30 +02:00
Benoit Marty
009601cf5b Debug info: render the roomId in the room details screen when developer mode is enabled. 2025-06-20 10:12:12 +02:00
ganfra
f3614ab67e change (room avatar) : clean code related to room name/avatar 2025-06-17 20:37:41 +02:00
ganfra
a5145279da change (room avatar) : use the new RoomAvatar with the isTombstoned param 2025-06-17 10:37:07 +02:00
ganfra
d6be3b5a1d change (room avatar) : expose isTombstone where we need to display the RoomAvatar 2025-06-17 10:37:07 +02:00
Benoit Marty
f001592320 Remove ExperimentalCoroutinesApi. Not necessary anymore.
tom with ExperimentalCoroutinesApi
2025-06-12 11:51:30 +02:00
Benoit Marty
72978b22f9 Remove ExperimentalFoundationApi. Not necessary anymore. 2025-06-11 18:10:55 +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
ganfra
45113818eb Merge pull request #4824 from element-hq/feature/fga/fix_identity_change
fix (identity change) :  RoomMemberIdentityStateChange in non encrypted room
2025-06-05 11:16:56 +02:00
renovate[bot]
96063373b7 fix(deps): update coil to v3.2.0 (#4712)
* fix(deps): update coil to v3.2.0

* Fix compilation issue. Need to provide an image for preview.

https://coil-kt.github.io/coil/compose/#previews

* Improve preview for images.

* Update screenshots

* More cleanup

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: ElementBot <android@element.io>
2025-06-05 09:49:27 +02:00
ganfra
df5e4062ec fix (identity change) : ensure we can configure to observe RoomMemberIdentityStateChange in non encrypted room if needed 2025-06-04 22:27:40 +02:00
Jorge Martin Espinosa
58a3ea8b1f Add catchingExceptions method to replace runCatching (#4797)
- 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.
2025-06-04 09:02:26 +02:00
renovate[bot]
9d5e8aa308 fix(deps): update dependency androidx.compose:compose-bom to v2025.04.01 (#4631)
* 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>
2025-06-03 21:05:43 +00:00
ganfra
cfbbccb09d Merge branch 'develop' into feature/fga/user_moderation_bottomsheet 2025-06-03 10:46:12 +02: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
ElementBot
498cf15d38 Sync Strings (#4775) 2025-05-30 08:47:39 +00:00
Benoit Marty
cf17d93580 Stronger lambda error (#4771)
* Make sure lambdaError() make the test fail in all circumstances.

* Fix existing errors on tests.

* Uniformize the way we are creating class under test.

* Cleanup

* Fix typo

* Fix failing test after rebase.
2025-05-27 15:32:09 +00:00
ganfra
3d5274a6d4 change (member moderation) : clean up 2025-05-24 11:23:09 +02:00
ganfra
03e1926e14 Merge branch 'develop' into feature/fga/user_moderation_bottomsheet 2025-05-23 17:28:48 +02:00
ganfra
2ac333bb52 change (member moderation) : clean and add tests on Presenter 2025-05-21 18:31:08 +02:00