100 Commits

Author SHA1 Message Date
Mauro Romito
7373eabffb refactored the ClientProxy to:
- throw an error during the init
- to have its init directly instantiate the sync service and the providers

Update ElementX/Sources/Services/UserSession/UserSessionStore.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

renamed
2025-03-06 14:13:55 +01:00
Stefan Ceriu
4d34a1ed56 Bump the RustSDK to v25.03.05
- adopt the new timeline configuration which now exposes read receipts tracking. For now it should be set to `false` for all timelines except the live one, which still gets configured properly on the rust side through `init_timeline`. Eventually we will converge on this configuration API for all of them.
- also adopt the new rust side cache clearing method and remove our own
2025-03-05 14:24:44 +02:00
Doug
8c07ee35c4 Update the SDK.
Handles changes that removed support for the sliding sync proxy.
2025-02-18 11:55:20 +00:00
manuroe
3950cac085
Dual licensing: AGPL + Element Commercial (#3657)
* New LICENSE-COMMERCIAL file

* Apply dual licenses: AGPL + Element Commercial to file headers

* Update README with dual licensing
2025-01-06 11:27:37 +01:00
Stefan Ceriu
df3e5976ce Bump the RustSDK to v1.0.79; add a feature flag for the new rust side ClientBuilder::useEventCachePersistentStorage 2024-12-10 18:19:31 +02:00
Stefan Ceriu
b122b02bee
Share extension (#3506)
* Setup simple share extension

* Switch the app url scheme to be the full bundle identifier

* Setup a share extension that show a SwiftUI view, uses rust tracing and redirects to the hosting aplication

* Move media as json through the custom scheme into the main app and deep link into the media upload preview screen

* Fix message forwarding and global search screen room summary provider filtering.

* Tweak the message forwarding and global search screen designs.

* Add a room selection screen to use after receiving a share request from the share extension

* Fix share extension entitlements

* Share the temporary directory between the main app and the extensions; rename the caches one.

* Remove the no longer needed notification avatar flipping fix.

* Extract the placeholder avatar image generator from the NSE

* Nest `AvatarSize` within the new `Avatars` enum

* Donate an `INSendMessageIntent` to the system every time we send a message so they appear as share suggestions

* Support suggestions in the share extension itself

* Improve sharing animations and fix presentation when room already on the stack

* Clear all routes when sharing without a preselected room.

* Fix broken unit tests

* Various initial tweaks following code review.

* Correctly clean up and dismiss the share extension for all paths.

* Move the share extension path to a constants enum

* Rename UserSessionFlowCoordinator specific share extension states and events

* Add UserSession and Room flow coordinator share route tests

* Tweak the share extension logic.
2024-11-13 14:02:47 +02:00
Stefan Ceriu
3a600a94d5 Fix #1947 - Check expected files are still present before restoring a session. 2024-11-12 15:50:51 +02:00
Valere
23ab453a1e
crypto: rename invisible crypto flag to deviceIsolationMode (#3331) 2024-09-26 12:24:46 +01:00
Doug
a8dbda90d9
Configure the AuthenticationService later now that we have 2 flows on the start screen. (#3316)
* Don't query the homeserver until confirming it (or selecting a different one).

* Setup the infrastructure to test AuthenticationService.

Implement basic tests for configuration & password login.

* Use the real AuthenticationService with a mock Client in all of the tests.

* Add tests for the ServerConfirmationScreenViewModel.

* Remove redundant view state and test for it.
2024-09-25 14:40:18 +01:00
Valere
69009a899a
Fix: confusion of lab flags for invisible crypto (#3319) 2024-09-23 16:43:02 +01:00
Valere
f7d878bac6
crypto: Add configuration flag to enable invisible crypto (#3247) 2024-09-18 16:30:45 +01:00
Stefan Ceriu
16d3cb6f3f Log where the user's state and caches folders were setup on startup. 2024-09-13 15:25:17 +03:00
Doug
af3a6ccbed
Make the SessionDirectories type responsible for cleaning up data. (#3261) 2024-09-11 14:32:03 +01:00
Stefan Ceriu
664e87fe87
Switch license to AGPL (#3237)
* Switch license file to AGPL

* Update file copyright headers

* Update the default project file header
2024-09-06 16:34:30 +03:00
Doug
904045f178 Default to native sliding sync discovery. 2024-08-30 14:45:54 +03:00
Doug
c9603dce55 Adopt sliding sync versions for client Restoration. 2024-08-30 14:45:54 +03:00
Doug
812c5d5c61
Update the SDK (#3196)
* Update the SDK.

* Fix API breaks on send failures and propagate the new type.

* Handle new SDK ShieldState.

* Set up the ClientBuilder's `cachePath` option.

* Delete the cacheDirectory during logout/clearCache.

* Add unit tests for RestorationToken decoding and SessionDirectories generation.
2024-08-27 11:06:26 +01:00
Stefan Ceriu
f89c3e54b4
Automatically try reloading failed images on network changes (#3170)
* 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
2024-08-15 18:20:19 +03:00
Mauro
ed7d3b0b13
Navigate to the Pinned events timeline (#3139) 2024-08-08 18:29:39 +02:00
Doug
013240e9b1
Fix the restoration of a SSS session. (#3081) 2024-07-24 10:55:40 +01:00
Doug
bf22250b45
Automatically sign out when toggling the SSS feature flag. (#3071) 2024-07-23 11:55:51 +01:00
Doug
2fb7f65957
Add a feature flag for Simplified Sliding Sync. (#3057)
* Disable SSS when logging out.

* Bump the SDK.
2024-07-18 10:16:51 +01:00
Doug
288d2c2fdc
Add a ClientBuilder hook. (#3056) 2024-07-18 09:47:37 +01:00
Doug
3465ea4cc1
Use a Client in AuthenticationService now that the Rust one has been removed. (#2954)
* Replace Rust's Authentication service by building a Client.

* Drop the Proxy from AuthenticationServiceProxy[Protocol].

* Make sure to call abortOIDCLogin.

* Centralise common ClientBuilder code.

* Update the SDK.
2024-06-24 15:05:00 +01:00
Stefan Ceriu
b614f43d00 Add a feature flag for fuzzy room list searching 2024-06-17 15:21:12 +03:00
Stefan Ceriu
b2afa04832 Cleanup dead code after Periphery run 2024-06-11 14:38:08 +03:00
Doug
2487895207
Adopt Rust's new sessionPath that replaces the basePath (#2903) 2024-06-06 18:35:57 +01:00
Stefan Ceriu
6c1647b851 Fixes #2842, fixes #2841 - Adopt new message sending queue API
- automatically retry failed requests as soon as the network is availble again
- remove manual retry options
2024-06-06 12:59:03 +03:00
Doug
11557e4879
Update the SDK. (#2776)
Handle async FFI changes.

Fix flakey unit test.
2024-05-03 12:00:05 +01:00
Stefan Ceriu
8ba544bc44
Cleanup following the AppMediator introduction (#2723)
- stop using multiple background task, the appCoordinator sync one is enough for the whole app
- move the AppMeditor to the MainActor
- expose the WindowManager through the AppMediator
- hide sensitive WindowManager API behind a different protocol
- remove the now unnecessary `BackgroundTaskService`
2024-04-22 18:10:24 +03:00
Stefan Ceriu
064626fbbe element-hq/element-x-ios/issues/2670 - Show invites as part of the room list 2024-04-09 18:18:11 +03:00
Mauro
9b949ce84e
Configure SDK to use the global/OS proxy (#2493) 2024-02-21 15:17:23 +01:00
Doug
01f42546e1
Enable database encryption for new logins on Nightly/PR builds. (#2328)
- Slightly reworks where the pusher client ID is generated.
2024-01-12 16:45:59 +00:00
Stefan Ceriu
ada75ab339 Fixes #2314 - Tweak avatar animations to increase perceived load times 2024-01-10 16:57:37 +02:00
Mauro
09fb5461e6
Removing dead code part 3 (#2264) 2023-12-19 12:12:16 +01:00
Stefan Ceriu
7f09c02298 Check network reachability before attempting to restart the sync service 2023-10-13 17:42:15 +03:00
Nicolas Mauri
2f0b5a42f5
Prevent multiple conversion of the same voice message audio file. (#1887) 2023-10-13 09:48:11 +00:00
Doug
b6470c9651
Initial setup ready for PIN/Biometric app lock. (#1876)
* Add AppLockCoordinator and WindowManager.
2023-10-11 12:59:47 +00:00
Doug
64d5ba7a69
Enable OIDC token refresh in the NSE. (#1711)
Update the SDK and handle API changes.
2023-09-15 09:01:09 +00:00
Doug
5e3a32157a
Enable OIDC support (#1541)
Notification content is bypassed for now.
2023-08-22 15:53:27 +01:00
Mauro
8188fd2d2a
NSE user agent support (#1507) 2023-08-17 13:11:34 +00:00
Doug
2025dd9517
Migration Screen (#1224)
- Hide bottom bar when in skeletons.
- Use the new design for the Waitlist screen too.
2023-06-30 13:27:49 +01:00
Stefan Ceriu
e6711a0236 Removed unused swipe gesture (+3 squashed commits)
Squashed commits:
[d64bb3bb] Stop using the ServiceLocator directly in the ScreenTrackerViewModifier
[37c46ab9] Rename Analytics to AnalyticsService
[8852a371] #920 - Cleanup ServiceLocator usages
2023-06-28 11:33:41 +03:00
Stefan Ceriu
0082aba9d4 Fixes #918, #919 - Introduce a RoomTimelineFlowCoordinator and related FlowCoordinator protocol
Squashed commits:
Add unit tests and move the state machine into the FlowCoordinator
[bb686861] Replace the RoomFlowCoordinator's public interface with just `handleAppRoute`
[0d9a4f8d] Remove the navigationStackCoordinator dependency from the roomScreenCoordinator
[4b5fbdf2] Allow rooms to be selected from any other state
[41dbd127] Move all missing coordinators to the RoomFlowCoordinator and state machines
[f32431b7] The UserSessionFlowCoordinator does not need to conform to the CoordinatorProtocol
[0f07e87d] Fix leaving a room dismissing the currently selected one when different
[138385a2] Rewind the navigation stack when re-selecting the same room (iPad)
[0727eb93] Fix presenting different room details from the side menu on iPads
[faf4cc60] Fix selecting the same room multiple times
[fb3391da] Move room details presentation responsibility to the RoomFlowCoordinator. Fixed invitation flows.
[fa2a68d9] Rename RoomTimelineFlowCoordinator -> RoomFlowCoordinator
[0c9c06b5] Start moving things away from the RoomScreenCoordinator and into the RoomTimelineFlowCoordinator
[86cbbdcc] Introduce a RoomTimelineFlowCoordinator to deal with timeline related operations
[9b2381be] Introduce the FlowCoordinatorProtocol
2023-05-26 17:42:39 +03:00
Alfonso Grillo
d9e0f36aeb
Invite people in an existing room (#915)
* Handle power levels

* Add “invite” button in RoomMembersListScreen

* Refactor DI in RoomDetailsScreenCoordinator

* Add navigation to “select people” coordinator

* Add InviteUsersScreenRoomContext

* Add invite user by id api

* Updare InviteUsersScreenRoomContext

* Support disabled state on FormButtonStyles

* Handle membership in UserProfileCell

* Fix conflicts

* Refactor RoomContext -> RoomType

* Refactor UserProfileCell

* Add invite action

* Setup navigation to user flow coordinator

* Add invite logic

* Fix test build errors

* Address comments

* Fix localisations

* Update required state

* Handle error

* Move invite logic in RoomDetailsScreenCoordinator

* Add navigation from room’s members list

* Fix UTs

* Fix missing display name in RoomMemberDetails

* Add user indicator

* Add feature flag

* Add RoomDetailsViewModel UTs

* Add room details ui tests

* Add InviteUsersViewModelTests UTs

* Add UI tests

* Update UI tests

* Empty commit
2023-05-22 14:03:07 +00:00
Stefan Ceriu
d574c0b405
Add background app refresh support (#892)
* Add background app refresh support

* Cleanup: move methods around so delegates are implemented above privates and privates are ordered better

* Add discardableResult on the userSessionStore's refreshRestorationToken
2023-05-15 13:06:25 +03:00
Stefan Ceriu
a2b38f7656 Fixes cache cleaning behavior after sdk change 2023-05-12 18:47:53 +03:00
Doug
185710adf4
Remove AppAuth and prepare for Rust OIDC. (#870) 2023-05-11 16:46:36 +01:00
Stefan Ceriu
a28e686c8d Add initial sync loading toast indicator 2023-05-11 17:31:44 +03:00
Stefan Ceriu
066006c4be Correct the state machine current state after failing to retrieve a particular room 2023-05-11 16:29:06 +03:00