Skip to content

Commit

Permalink
fix: Clean the code according to review
Browse files Browse the repository at this point in the history
  • Loading branch information
BaptGrv committed Feb 19, 2025
1 parent f3be8e2 commit b135885
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion kDrive/UI/Controller/Home/RootMenuHeaderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ class RootMenuHeaderView: UICollectionReusableView {
}

@objc func reloadWifiView(_ notification: Notification) {
print("Call observeNetworkChange")
updateWifiView()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,11 +550,7 @@ extension PhotoSyncSettingsViewController: PhotoSyncSettingsTableViewCellDelegat
extension PhotoSyncSettingsViewController: WifiSyncSettingsDelegate {
func didSelectSyncMode(_ mode: SyncMode) {
liveNewSyncSettings.wifiSync = mode
if mode == .onlyWifi {
UserDefaults.shared.isWifiOnly = true
} else {
UserDefaults.shared.isWifiOnly = false
}
UserDefaults.shared.isWifiOnly = (mode == .onlyWifi)
updateSaveButtonState()
tableView.reloadRows(
at: [IndexPath(row: PhotoSyncSettingsRows.wifiSync.rawValue, section: PhotoSyncSection.syncSettings.rawValue)],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ extension UploadOperation {
return
}

uploadQueue.cancelRunningOperations()
uploadQueue.suspendAllOperations()
uploadQueue.cancelRunningOperations()
throw ErrorDomain.uploadOverDataRestrictedError
}
}
2 changes: 1 addition & 1 deletion kDriveCore/Utils/DriveUserDefaults+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ extension UserDefaults.Keys {
static let selectedHomeIndex = UserDefaults.Keys(rawValue: "selectedHomeIndex")
static let fpStorageVersion = UserDefaults.Keys(rawValue: "fpStorageVersion")
static let importPhotoFormat = UserDefaults.Keys(rawValue: "importPhotoFormat")
static let syncOfflineMode = UserDefaults.Keys(rawValue: "syncOfflineMod")
static let syncOfflineMode = UserDefaults.Keys(rawValue: "syncOfflineMode")
}

public extension UserDefaults {
Expand Down

0 comments on commit b135885

Please sign in to comment.