From dc8dae9d19d25806a1408e439495af3cfde544ab Mon Sep 17 00:00:00 2001 From: Selim Mustafaev Date: Sat, 2 Jan 2021 19:35:13 +0300 Subject: [PATCH] Fixed bug with editing event --- .../Location/LocationEditController.swift | 3 +++ AutoCat/Controllers/SettingsController.swift | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/AutoCat/Controllers/Location/LocationEditController.swift b/AutoCat/Controllers/Location/LocationEditController.swift index 936da97..d74f18a 100644 --- a/AutoCat/Controllers/Location/LocationEditController.swift +++ b/AutoCat/Controllers/Location/LocationEditController.swift @@ -27,6 +27,9 @@ class LocationEditController: FormViewController { }.onChange { row in if let newDate = row.value { self.date = newDate + self.doneButton.isEnabled = true + } else { + self.doneButton.isEnabled = false } } diff --git a/AutoCat/Controllers/SettingsController.swift b/AutoCat/Controllers/SettingsController.swift index ea9f34d..b0ee610 100644 --- a/AutoCat/Controllers/SettingsController.swift +++ b/AutoCat/Controllers/SettingsController.swift @@ -72,20 +72,20 @@ class SettingsController: FormViewController { } } - +++ Section("") - <<< ButtonRow("SignOut") { $0.title = NSLocalizedString("Sign Out", comment: "") }.onCellSelection { cell, row in - self.logout() - } - +++ Section(NSLocalizedString("Debug", comment: "")) <<< SwitchRow() { row in row.title = NSLocalizedString("Show debug info", comment: "") - row.value = Settings.shared.showDebugInfos + row.value = Settings.shared.showDebugInfo }.onChange { row in if let val = row.value { Settings.shared.showDebugInfo = val } } + + +++ Section("") + <<< ButtonRow("SignOut") { $0.title = NSLocalizedString("Sign Out", comment: "") }.onCellSelection { cell, row in + self.logout() + } #if targetEnvironment(macCatalyst) if let beepSection = self.form.sectionBy(tag: "BeepRecordSection") {