Skip to content

Commit

Permalink
fix(PhotoSyncSettingsViewController): Update upload queue on save pho…
Browse files Browse the repository at this point in the history
…to sync settings
  • Loading branch information
adrien-coye committed Feb 26, 2025
1 parent 2f0c036 commit c341f8a
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ final class PhotoSyncSettingsViewController: BaseGroupedTableViewController {
@LazyInjectService var accountManager: AccountManageable
@LazyInjectService var photoLibraryUploader: PhotoLibraryUploader
@LazyInjectService var freeSpaceService: FreeSpaceService
@LazyInjectService var uploadQueue: UploadQueue

private enum PhotoSyncSection: Int {
case syncSwitch
Expand Down Expand Up @@ -226,6 +227,12 @@ final class PhotoSyncSettingsViewController: BaseGroupedTableViewController {

let newSettings = PhotoSyncSettings(value: liveNewSyncSettings)
photoLibraryUploader.enableSync(newSettings)
uploadQueue.retryAllOperations(
withParent: newSettings.parentDirectoryId,
userId: newSettings.userId,
driveId: newSettings.driveId
)
uploadQueue.updateQueueSuspension()
}

private func requestAuthorization() async -> PHAuthorizationStatus {
Expand Down

0 comments on commit c341f8a

Please sign in to comment.