Toggles Delta Sync switch back on if user cancels “Disable Syncing?” warning alert

This commit is contained in:
Riley Testut 2023-07-06 19:11:09 -05:00
parent 35a8f90a1c
commit 19fb333a67

View File

@ -57,7 +57,9 @@ private extension SyncingServicesViewController
if SyncManager.shared.coordinator?.account != nil if SyncManager.shared.coordinator?.account != nil
{ {
let alertController = UIAlertController(title: NSLocalizedString("Disable Syncing?", comment: ""), message: NSLocalizedString("Enabling syncing again later may result in conflicts that must be resolved manually.", comment: ""), preferredStyle: .alert) let alertController = UIAlertController(title: NSLocalizedString("Disable Syncing?", comment: ""), message: NSLocalizedString("Enabling syncing again later may result in conflicts that must be resolved manually.", comment: ""), preferredStyle: .alert)
alertController.addAction(.cancel) alertController.addAction(UIAlertAction(title: UIAlertAction.cancel.title, style: UIAlertAction.cancel.style) { (action) in
sender.setOn(true, animated: true)
})
alertController.addAction(UIAlertAction(title: NSLocalizedString("Disable", comment: ""), style: .default) { (action) in alertController.addAction(UIAlertAction(title: NSLocalizedString("Disable", comment: ""), style: .default) { (action) in
self.changeService(to: nil) self.changeService(to: nil)
}) })