* 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>
* 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>
* 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>
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>
`JoinedRoom` will now contain both a mandatory live timeline reference and all the functionality associated to it.
`BaseRoom` on the other hand will contain only functionality that's shared for both joined and not joined rooms.
`NotJoinedRoom` is a wrapper around `RoomPreviewInfo` data and a possible local `BaseRoom`, if it exists.
The `RustRoomFactory` cache is now gone since the persistent event cache should have the same effect.
* Fix settings entry point not available when there is no avatar on the account. Fixes#4599.
* Use Ktx extension `String.toUri()`
* Allow screen reader to focus on the user avatar to allow editing it.
* Fix import order
* Make whole messages selectable and readable as a single unit when possible.
* Make most UI components not clickable when talkback is enabled.
* Make voice messages work with talkback too.
* Read grouped state events even if the events are collapsed.
* Move image and video item actions to the timeline item.
* Improve accessibility in the message context menu too
* Fix a11y issue on add attachment button.
* Add `contentDescription` to file icon so it's read aloud
---------
Co-authored-by: Benoit Marty <benoit@matrix.org>
* For the user info in the timeline items, display the ripple effects according to the bounds and shape of the user avatar and display name
* Fix ripple in other screens too
Breaking changes addressed:
* Make `MatrixClient.getNotificationSettings()` async, cache its result.
* Use `RoomInfo` for accessing the updated room's info.
* Refactor `MatrixRoom` so it always receives an initial `MatrixRoomInfo` value: this value will be used to make `MatrixRoom.roomInfoFlow` a `StateFlow` so we can assume the initial updated Room data will be present.
* Fetch encryption state when loading a room if it's unknown
* Move `observeRoomMemberIdentityStateChange` and associated classes to `libs:matrixui` module so they can be reused
* Add `EncryptionService.getUserIdentity` method to retrieve not only if the user is verified or not, but in which state they are
* Fix `IdentityChangePresenter` after the previous changes
* Fix `withFakeLifecycleOwner` and add `testWithLifecycleOwner` helper
* Display verified badge in DM top app bar when possible
* Display a verification violation warning icon next to the 'People' item in room details screen
* Display either a verified badge or a verification violation warning icon next to the room members in the room member list screen
* Display either a verified badge or a verification violation warning and withdraw verification button in the room member profile.
Generic user profiles won't display verification state anymore since we can't easily track changes in it.
* Add preview for room member details screen with verification violation identity state
* Add verified and violation badge to the `Profile` list item in room details screen
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>