Commit graph

671 commits

Author SHA1 Message Date
Claudio Cambra
1b75056fb1 Run post-auth state check with main actor task
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-10-18 06:20:54 +00:00
Claudio Cambra
f3dde1907a Fix swift 6 concurrency error regarding use of authAttemptState
Cannot pass a local variable into a concurrently executing Task. It's
not a real issue as we are using a semaphore to wait before using this
variable for anything outside of the Task block, but still.

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-10-18 06:20:54 +00:00
Claudio Cambra
5eceb725c8 Stop fetching user profile details now that is not necessary in file provider extension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-10-11 09:03:16 +00:00
Claudio Cambra
49f7b06261 Handle userId correctly in File Provider Extension client interface
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-10-11 09:03:16 +00:00
Claudio Cambra
5b472a238c Properly provide both user-provided username AND backing user ID to File Provider Extension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-10-11 09:03:16 +00:00
Claudio Cambra
94b84a5c46 Fetch user profile (and user ID) when setting up domain account
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-10-11 09:03:16 +00:00
Claudio Cambra
47bb200fb7 Wait for task to complete synchronously after setting up domain account rather than wrapping everything in task
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-10-11 09:03:16 +00:00
Claudio Cambra
35073e61f8 Retry authentication if connection timed out
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-10-11 09:03:16 +00:00
Claudio Cambra
e7e958ed82 Try to authenticate new account details before setting them
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-10-11 09:03:16 +00:00
Claudio Cambra
4e3129f4f4 Downgrade deployment target variables to 11.0 as 12.0 is not necessary
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-24 10:19:30 +08:00
Claudio Cambra
44f640a330 Signal enumeration of locked/unlocked file
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
bda7d45a6b Do not provide items if account is not set up correctly
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
71454fc40e Display checkmark when file lock completed
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
820fbbd3c3 Fix NSExtensionFileProviderActionActivationRules for locking menu items
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
ec8b65c248 Add warn image to locking view if there is an error
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
6d87b210c3 Fix internal layouting of lock view by simply using a nsview rather than fumbling with a stack view
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
51fba996cb Fix XIB initialisation in LockViewController
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
e805993b9f Fix file lock server url in lockviewcontroller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
8533fdd4a0 Make sure not to check for kit before we should in shares table view data source
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
bcbfdc942e Once finished locking/unlocking, stop loading indicator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
4db6f8c2ed Pull out error handling from completionHandler for nckit lockunlock
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
cce98f1e84 Stop loading indicator when presenting error
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
c5be665ce0 Add convenience function to stop/hide loading indicator in lock view controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
2b7734ac4d Perform lock/unlock procedure in lock view controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
72ec0d5f1f Process target item on init of lock view controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
7cd50005c2 Add method to simply provide file details in locking view
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
70d0c74b84 Add convenience method to present and log errors in lock view controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
58586e84ac Move item metadata fetch into util file in FileProviderUIExt
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
9ccbf3f2c5 Move service connection fetcher method into a utils file
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
1b2fc0e034 Add close action to lock view controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
515cc5c96c Design lock view in file provider ui
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
86a741bc40 Add basic properties to lock view controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
954b6ca942 Handle new locking action identifiers in document action view controller of FileProviderUIExt
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
b975b2dfa1 Add lock/unlock actions in FileProviderUIExt info plist
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
3a983c22bf Add basic LockViewController components
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
3c4d6bda2f Move all sharing components for FileProviderUIExt into a Sharing folder
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 10:15:58 +02:00
Claudio Cambra
1283284572 Remove ncAccount usages removed in NCFPK API
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-29 16:52:37 +08:00
Claudio Cambra
92f42bc16d
Lock and unlock when accessing sync actions in FileProviderExt to protect against possible races
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-23 14:06:29 +08:00
Claudio Cambra
939d67bfcc
Set self as listener for Enumerator in FileProviderExt
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-23 14:06:29 +08:00
Claudio Cambra
617ca1a153
Add conformance to NextcloudFileProviderKit's EnumerationListener protocol in FileProviderExt
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-23 14:06:28 +08:00
Claudio Cambra
0c78594481
Track sync actions in main FileProviderExt procedures
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-23 14:06:28 +08:00
Claudio Cambra
3f3f478f6a
Add method to remove finished sync action in FileProviderExt
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-23 14:06:28 +08:00
Claudio Cambra
c189f2952f
Add method to mark action as error sync action in FileProviderExt
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-23 14:06:28 +08:00
Claudio Cambra
3e6b20713e
Add method to insert new sync action in FileProviderExt
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-23 14:06:28 +08:00
Claudio Cambra
885d9f3566
Add method to report a change in sync state if applicable in FileProviderExt
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-23 14:06:28 +08:00
Claudio Cambra
5237822221
Add sets for actions, to be able to track multiple actions
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-23 14:06:28 +08:00
Claudio Cambra
e7a164d312 Remove unused urlsession stuff in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-19 16:24:21 +08:00
Claudio Cambra
ac6e0d81f6 Implement ChangeNotificationInterface in client interface extension of FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-19 16:24:21 +08:00
Claudio Cambra
73fde5065d Adapt to remoteInterface changes in NCFPK
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-19 16:24:21 +08:00
Claudio Cambra
313f3bdb72 Add NCFPKAppGroupIdentifier in FileProviderExt info plist
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-19 16:24:21 +08:00