Commit Graph

953 Commits

Author SHA1 Message Date
Doug
44de05e185 Add support for Space avatars. (#4362) 2025-07-29 12:20:13 +01:00
Doug
05fc508632 Use the maxUploadSize in the media upload screen. (#4359)
* Fix a bug where some files sizes were sent as 0.

* Make FileManger.sizeForItem(at:) a UInt.

The docs specifically say that FileAttributeKey.size returns an unsigned long long so I have no idea why we were returning a Double here…

* Add the maxMediaUploadSize property on ClientProxy.

* Use the maxUploadSize to set a target video size and to show a file too big error.

* Refactor media upload parameter order.
2025-07-29 12:18:53 +01:00
Doug
3b4ece5c4a Refactor LoggingTests utilising Rust's new ability to redirect log files at runtime. (#4353) 2025-07-25 08:54:36 +01:00
Stefan Ceriu
78cbcc5c26 Use the new TimelineController message sending methods for media uploads. 2025-07-24 14:55:34 +03:00
Stefan Ceriu
a5e1743a78 Remove the threadRootEventID associated value from all the RoomFlowCoordinatorStateMachine states and replace them with a UserInfo passed TimelineController. 2025-07-24 14:55:34 +03:00
Stefan Ceriu
6b94c538bf Transition voice messages to the new in thread sending mechanism 2025-07-24 14:55:34 +03:00
Stefan Ceriu
1e7afc93fa Remove threadRootEventID parameters from TimelineProxy send methods. This is now handled internally to the SDK as long as the right timeline instance is used. 2025-07-24 14:55:34 +03:00
Doug
d6ca170ed9 Update the default logs directory and allow collection from elsewhere. (#4352)
* Replace deprecated URL methods.

* Start putting log files in Library/Logs (moving existing files with a migration.)

* Make Tracing.deleteLogFiles aware of the legacy logs location.

* Allow the logs to be collected from a different directory.
2025-07-24 09:49:29 +01:00
Doug
ee9f055822 Add a TracingHook. (#4345) 2025-07-23 14:29:31 +01:00
Doug
b7867dac85 Make the remote settings hook usable within the app extensions. (#4342) 2025-07-22 17:09:53 +01:00
Doug
f65b191c8a Refactor Rageshake URL and Target configuration. (#4337)
* Move the rageshakeURL configuration from the BugReportService to AppSettings.

* Refactor Target to return a handle when configuring.

This helps with reconfiguration and removes the @MainActor constraint.
2025-07-22 10:19:26 +01:00
Doug
3cb815f7d4 Show an alert when entering an account provider that requires Element Pro. (#4326) 2025-07-17 12:41:26 +00:00
Doug
a489ec8a8c Merge the AuthenticationService with the QRCodeLoginService. (#4323)
* Merge the AuthenticationServer with the QRCodeLoginService.

* Merge AuthenticationClientBuilderFactory and AuthenticationClientBuilder into AuthenticationClientFactory

The separation is no longer needed now that password/OIDC login and QR code login have a similar API shape.
2025-07-15 17:59:15 +01:00
Doug
b0dd6ddf46 Update the SDK to fix a sync performance regression. (#4324) 2025-07-15 10:51:59 +00:00
Doug
755e4bf7a4 Update the SDK and build a client before logging in with a QR code. (#4320) 2025-07-14 13:31:06 +00:00
Doug
10bf553afd Use the timeline when marking a room as read (#4319)
* Forward JoinedRoomProxy.markAsRead to the timeline

The room version was building a fresh timeline even though we already had one.

* Run swiftformat 0.57.0.
2025-07-14 12:20:41 +01:00
Doug
84ff9ee2e2 Adopt StateStoreViewModelV2 in more screens. (#4275)
* Use StateStoreViewModelV2 in AnalyticsPromptScreen.

* Use StateStoreViewModelV2 in UserProfileScreen.

* Use StateStoreViewModelV2 in MediaUploadPreviewScreen.

* Use StateStoreViewModelV2 in the Roles & Permissions screens.

* Add the asyncStream variant of deferFailure.

* Use StateStoreViewModelV2 in BlockedUsersScreen.

* Use StateStoreViewModelV2 in ManageRoomMemberSheet.

* Use StateStoreViewModelV2 in ResolveVerifiedUserSendFailureScreen.

* Use StateStoreViewModelV2 in ReportContentScreen.

* Use StateStoreViewModelV2 in ReportRoomScreen.

* Use StateStoreViewModelV2 in StaticLocationScreen.

* Use StateStoreViewModelV2 in EmojiPickerScreen.

* Use StateStoreViewModelV2 in PollFormScreen.

* Use StateStoreViewModelV2 in DeclineAndBlockScreen.

* Use StateStoreViewModelV2 in RoomDetailsScreen.

* Fix a random compilation error that just popped up 🤷‍♂️

* Fix expectation message.
2025-07-02 15:13:42 +01:00
Doug
13e7bbc678 Fix flakey AuthenticationService test. (#4270)
The AppSettings overrides were being propagated.
2025-06-30 16:31:01 +01:00
Doug
e882b9e7b8 Support runtime customisation of the rageshake URL. (#4267) 2025-06-30 10:18:25 +01:00
Stefan Ceriu
af5b670bf3 Be more lenient with the power levels as they can still be missing at the time the various screens are created e.g. after accepting an invite.
The correct solution is to subscribe to update and update the UI accordingly when receiving them.
2025-06-26 18:57:46 +03:00
Doug
12bd687494 Use mock log files for the BugReportScreenViewModelTests. (#4257)
The array could be empty if a previous test deleted the logs.
2025-06-26 12:36:13 +01:00
Stefan Ceriu
7e30902ee1 Bump the SDK to v25.06.25; adopt the new optional RoomInfo joinRule and isPublic. 2025-06-25 17:23:22 +03:00
Stefan Ceriu
64f0d4cd01 Adopt new canOwnUser* power level methods instead of the throwing ones. 2025-06-25 17:23:22 +03:00
Stefan Ceriu
e5a49c568f Adopt room info power levels (#4245)
* 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>
2025-06-24 17:48:00 +01:00
Doug
f0e653e462 Fix a crash when attempting to send a bug report with excessively large logs. (#4243)
* Alert the user when there are excessively large log files.
2025-06-24 09:47:20 +01:00
Stefan Ceriu
46a066491d Better integrate RoomPowerLevelsProxyMock's own Configuration struct. 2025-06-20 18:10:45 +03:00
Stefan Ceriu
60f4228162 Adopt the lastest SDK APIs and refactor how we deal with user permissions.
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.
2025-06-20 18:10:45 +03:00
Stefan Ceriu
c08e2467df Fix the MockImageCache and the unit tests following the Kingfisher update. 2025-06-18 19:50:06 +03:00
Doug
1f6f8b8f4c Refactor reportUrl to reportURL. 2025-06-18 14:32:26 +01:00
Stefan Ceriu
9b8e28e593 Fix preview test crashes when accessing misconfigured draft service mocks 2025-06-13 17:42:40 +03:00
Stefan Ceriu
abbf5c8c8b Add support for sending media within threads.
This patch add the `threadRootEventID` as a parameter to media sending functions and forwards the timeline thread root between various application states to the place where its needed.
The 2 missing items are Locations and Polls which currently don't have any support on the Rust side for being sent within threads. That will come in a separate PR.
2025-06-10 21:20:09 +03:00
Stefan Ceriu
7fd51a5312 Fix broken unit tests following app hook changes. 2025-06-10 15:09:20 +03:00
Mauro Romito
53b92ad68f send .fullyRead marker when leaving the room 2025-06-10 11:32:15 +02:00
Doug
681ec8ee38 Add a RoomScreenHook. 2025-06-10 10:28:18 +03:00
Stefan Ceriu
6d697dfed1 Move ComposerToolbar view required dependencies to the view model and read them, similarly to the other views, through the context's view state. 2025-06-10 08:57:08 +03:00
Mauro Romito
5679cecd8c fixed tests 2025-06-06 10:49:29 +02:00
Hugh Nimmo-Smith
60c898f78c Support for experimental MSC4286 to not render external payment details (#4099)
Ref: https://github.com/matrix-org/matrix-spec-proposals/pull/4286
2025-06-03 12:22:14 +01:00
Doug
b4174aed22 Adopt StateStoreViewModelV2 in the remaining settings screens. (#4158)
* Move the AuthenticationStartScreen into the Authentication directory.

* Commit the updated Sentry license.

No idea why they dropped the 2024 🤷‍♂️

* Use StateStoreViewModelV2 in BugReportScreen.

* Use StateStoreViewModelV2 in UserDetailsEditScreen.

* Use StateStoreViewModelV2 in NotificationSettingsScreen.

* Use StateStoreViewModelV2 in NotificationSettingsEditScreen.

* Use StateStoreViewModelV2 in LegalInformationScreen.

* Use StateStoreViewModelV2 in LogViewerScreen.

* Use StateStoreViewModelV2 in AnalyticsSettingsScreen.

* Rename AdvancedSettingsScreen directory.

* Use StateStoreViewModelV2 in EncryptionResetScreen.

* Use StateStoreViewModelV2 in EncryptionResetPasswordScreen.

* Use StateStoreViewModelV2 in SecureBackup…Screens.

* Use StateStoreViewModelV2 in LoginScreen.

Seems this one was ignored waiting on the fulfillment transitionValues implementation.

* Use StateStoreViewModelV2 in DeactivateAccountScreen.

* Move DeactivateAccountScreen into the Settings directory.
2025-05-30 12:24:56 +01:00
Stefan Ceriu
3dd98adeeb Setup the new RustSDK sentry integration 2025-05-27 18:21:11 +03:00
Stefan Ceriu
47cdb15b9d Bump the SDK to v25.05.26-2 and update the breaking changes following the RoomListItem removal 2025-05-26 18:11:24 +03:00
Stefan Ceriu
b9ad6ed557 Rename the TimelineProvider to TimelineItemProvider 2025-05-23 16:08:18 +03:00
Stefan Ceriu
d4e505854a Move the pinned timeline in line with the other timeline creation methods and have it report errors just like the others 2025-05-22 18:14:55 +03:00
Doug
bea64831cf Show an account provider picker on the server confirmation screen when required. (#4137)
* Add a picker mode to the ServerConfirmationScreen.

* Hook up the account provider picker in authentication the flow.

Simplify the authentication flow coordinator, removing the restricted state.

* UI/Snapshot tests.
2025-05-20 17:21:08 +01:00
Doug
33fcb8e667 Allow the app to be configured to bypass the server selection screen. (#4131)
* Make account provider configuration more flexible.

- Change defaultHomeserverAddress to an array of providers (needs UI).
- Add allowOtherAccountProviders to prevent the user from manually entering a provider.

* Refactor QR code scan failures into a common type.

* Validate scanned QR codes against the allowed account providers.

* Hide the login flow on the QR code screen when restricted.
2025-05-20 11:09:50 +01:00
Mauro
0154e10f98 Always open manage member sheet (#4110)
* 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>
2025-05-19 14:17:57 +00:00
Stefan Ceriu
c9743237e2 Observe room info updates and automatically dismiss the room if meanwhile left or banned (#4122)
* Fix #3302 - Observe room info updates and automatically dismiss the room if meanwhile left or banned.
2025-05-16 12:55:33 +03:00
Stefan Ceriu
4c7791ab24 Fix various small errors when running in the Swift 6 language mode (#4109)
* Fix various small errors when running in the Swift 6 language mode

* Make the `TargetConfiguration` run on the main actor.

* Fixed a comment

* Add a comment as to why we can't make the whole NSE a main actor.

* Fix the unit tests

* Fix `blankLinesAtStartOfScope` swiftformat error.
2025-05-13 11:43:47 +03:00
Stefan Ceriu
433b042038 Fix room list heroes label format
- change from `Alice, Bob and Charlie` to `Alice, Bob, Charlie and 42 others` (when applicable)
2025-05-12 19:40:14 +03:00
Doug
cb5c7337d2 Add support for Account Provisioning links. (#4108)
* Add support for account provisioning links and route them to the authentication flow.

* Use the provisioning parameters to configure the authentication flow.

* Add UI tests for the provisioned authentication flow.

* Record new preview snapshots.

* Add unit tests.

* Make the domain configurable in the app settings.

* Use the loginHint in the login screen too.
2025-05-12 13:28:34 +01:00
Doug
7add662cad Adopt StateStoreViewModelV2 in the authentication screens and some settings screens. (#4083)
* Add some tests for DeferredFulfillment with Observation.

* Use StateStoreViewModelV2 in AuthenticationStartScreen.

* Use StateStoreViewModelV2 in ServerConfirmationScreen.

* Use StateStoreViewModelV2 in ServerSelectionScreen.

* Use StateStoreViewModelV2 in SoftLogoutScreen.

* Use StateStoreViewModelV2 in SettingsScreen.

* Use StateStoreViewModelV2 in DeveloperOptionsScreen.

* Use StateStoreViewModelV2 in AdvancedSettingsScreen.
2025-05-01 09:35:59 +01:00