* Use the newly RoomInfo published PowerLevels; update permissions at the same time as the room info and avoid unnecessary async calls.
* Introduce a RoomInfoProxyProtocol and associated mock and move away from mocked SDK RoomInfos
* Bump the SDK to v25.06.23
* Expose new non-throwing methods for checking one's own user permissions
* Fix the unit and preview tests (except the TimelineMediaPreviewDetails for which simplified snapshots were generated)
* Converge on one single implementation for computing a room's avatar.
* Fix more unit tests
* Fix the TimelineMediaPreviewDetailsView snapshot tests
This reverts commit 9b6c819e611ad2fa3de2c34a4a7aa556fc9faadd.
---------
Co-authored-by: Doug <douglase@element.io>
This patch introduces a new RoomPowerLevelsProxy and its associated mock and adopts newer Rust APIs to make working with user power levels and permissions easier.
* always open manage member sheet
* Update ElementX/Sources/Screens/ManageRoomMemberSheet/ManageRoomMemberSheetModels.swift
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
* Update ElementX/Sources/Screens/ManageRoomMemberSheet/ManageRoomMemberSheetModels.swift
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
* pr suggestions and handled the buttons actions correctly
* Update ElementX/Sources/Screens/ManageRoomMemberSheet/View/ManageRoomMemberSheetView.swift
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
* fixed some compilation errors
* added some documentation
* using a struct instead of a protocol
* using arguments instead of a struct
---------
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
* Bump the RustSDK to v25.03.11
* Replace oidc login prompt with nil following the changes from https://github.com/matrix-org/matrix-rust-sdk/pull/4761
```
/// * `prompt` - The desired user experience in the web UI. No value means
/// that the user wishes to login into an existing account, and a value of
/// `Create` means that the user wishes to register a new account.
```
* Fix trailing closure warnings
* Update the client proxy after making `getNotificationSettings()` and `cachedAvatarUrl()` async (they used to be blocking on the rust side).
* Move `Room.isEncrypted` to the info publisher and manually update the encryption state when creating the room.
* Bump the SDK again to v25.03.12 - This introduces a new way to configure the tokio runtime that we can use to have extensions use less memory
- introduce a new Target struct that takes care of setting up rust services (tracing and tokio) for our various targets
- cleanup MXLog and friends
* Address PR comments
* Bump the SDK again, switch back to using `.consent` as the OIDC login prompt (which was reintroduced in matrix-org/matrix-rust-sdk/pull/4791)
* Introduce a `UserIdentityProxy` and have it combine upstream methods into an easy to digest `UserIdentityVerificationState`. Use it in a dedicated `VerificationBadge` UI component
* Show a DMs counterpart verification state in the room header
* Show a warning on the room details `People` entry when there are identity verification state violations on any of the members.
* Show verification badges in the room member list
* Show a withdraw verification section on the room member details for users that have pinning violations.
* Remove the verification section from the profile screen as there's no reliable way to keep it up to date
- the underlying Rust SDK Olm Machine can be rebuilt without notice which would break any existing user identity change streams.
* Update preview test snapshots
* Retrofit `deferFulfillment` onto snapshot tests.
* Convert a bunch of preview tests to the new fulfillment publisher
* Convert more tests
* Remove unneeded delays from the remaining tests
* Remove snapshotting delay option.
* Replace Prefire with a very similar but simpler and more direct approach
* Move PreviewTest snapshots to their new location (snapshotting default, mirrors UITests)
* Update acknowledgements
* Switch snapshot configuration extensions to a custom version
* Exclude snapshots from the PreviewTests target
* Fix acknowledgements
* Rename snapshotting preference keys
* Remove `skipPackagePluginValidation`
* Add the networkMonitor to the NSE and delete the old MockMediaLoader
* Generate a MediaLoaderMock through AutoMockable and use it in the MediaProviderTests
* Implement an ImageProvider mechanism that automatically tries reloading images when connectivity is established again and use it for LoadableImages
* Merge the ImageProvider protocol back into the MediaProvider
* Address PR review comments
* Provide a default sdk client request configuration
* Address tasks not automatically cancelling themselves when views get deallocated
- proxy errors have been getting repetitive and not particularly useful
- differentiate between sdk and client errors and keep what provides value
- add error logs everywhere a failure occurs
* Fix search field string.
* Show your own user as an Admin when changing roles.
* Also show invited users when changing roles.
* Don't allow admin's to kick/ban other admins or themselves.
* Fix a bug when left members were counted as admins/moderators.
* Show when a member is pending.
* Add sections to the change role screen.
* Add an option to use analytics locally.
* Add analytics for Room Moderation.
* Update tests.
* Include the role in the event where appropriate.
* Update the AnalyticsEvents package.
* Only allow admins to see the roles and permissions screen.
* Hide the selection checkbox on Admins when changing roles.
* Show an empty state for banned users.
* Add separate actions for ban and remove.
* Implement reset permissions and demote self alerts.
* Add tests for resetting permissions and demoting self.
* Add a warning when promoting someone to administrator.
* Add a temporary membershipChangePublisher on the timeline.
* Kick/Ban users from a room.
* Unit tests.
* Disable autocorrection on the members list search field.
* Fix flakey emoji provider tests
* Fix flakey RoomScreenViewModel tests
* Fix flakey HomeScreenViewModel tests
* Fix flakey RoomMemberListScreen tests, problem with bindings getting overriden and deferFulfillment cancellable not getting stored
* Fix flakey RoomNotificationSettingsScreen tests and crashes
* Fix flakey RoomMemberDetailsScreen tests
* Deprecate old `deferFulfillment` and `nextViewState` methods
* Convert more files to the new `deferFulfillment`
* Converted the rest of the tests to the new deferFulfillment
* Removed now unused `nextViewState` and `deferFulfillment`
* Remove automatic retries from unit tests
* Reset analytics flag after running unit tests
* Address PR comments
* Introduce a new `deferFulfillment(publisher, keyPath, transitionValues)` method and use it where appropiate
* #750 - Convert the SoftLogoutScreen to combine
* #750 - Convert the UserSessionFlowCoordinator to Combine
* #750 - Convert the AnalyticsPromptScreen to Combine
* #750 - Convert the LoginScreen to Combine
* #750 - Convert the ServerSelectionScreen to Combine
* #750 - Convert the EmojiPickerScreen to Combine
* #750 - Convert the HomeScreen to Combine
* #750 - Convert the MediaUploadPreviewScreen to Combine
* #750 - Convert the OnboardingScreen to Combine
* Rename `Onboarding` to `OnboardingScreen`
* #750 - Convert the ReportContentScreen to Combine
* #750 - Convert the RoomDetailsSscreen to Combine
* #750 - Convert the RoomMemberDetailsScreen to Combine
* #750 - Convert the RoomMembersListScreen to Combine
* #750 - Convert the SessionVerificationScreen to Combine
* #750 - Convert the SettingsScreen to Combine
* #750 - Convert the AdvancedSettingsScreen to Combine
* #750 - Convert the DeveloperOptionsScreen to Combine
* Fix the unit tests
* Use .sink action and the same cancellables constructor everywhere
* Cleanup cancellables when setting up tests
Squashed commits:
[d64bb3bb] Stop using the ServiceLocator directly in the ScreenTrackerViewModifier
[37c46ab9] Rename Analytics to AnalyticsService
[8852a371] #920 - Cleanup ServiceLocator usages