diff --git a/MTMR/Widgets/PomodoroBarItem.swift b/MTMR/Widgets/PomodoroBarItem.swift index dbf3153..240b2d7 100644 --- a/MTMR/Widgets/PomodoroBarItem.swift +++ b/MTMR/Widgets/PomodoroBarItem.swift @@ -37,7 +37,7 @@ class PomodoroBarItem: CustomButtonTouchBarItem, Widget { //Vars are used for pausing the timer. private var started = false - private var timerPaused: Bool = false; + private var timerPaused: Bool = false private let defaultTitle = "" private let workTime: TimeInterval @@ -67,23 +67,22 @@ class PomodoroBarItem: CustomButtonTouchBarItem, Widget { } @objc func startStopWork() { if !started { - started = true; + started = true typeTime = .work startStopTimer() } else { if timerPaused { - timerPaused = false; - resumeTimer(); + timerPaused = false + resumeTimer() } else { - timerPaused = true; - pauseTimer(); - + timerPaused = true + pauseTimer() } } } @objc func startStopRest() { - started = false; + started = false typeTime = .rest startStopTimer() } @@ -94,12 +93,12 @@ class PomodoroBarItem: CustomButtonTouchBarItem, Widget { func resumeTimer() { guard let timervalue = timer else { return } - timervalue.resume(); + timervalue.resume() } func pauseTimer() { guard let timervalue = timer else { return } - timervalue.suspend(); + timervalue.suspend() } private func start() { @@ -151,4 +150,4 @@ class PomodoroBarItem: CustomButtonTouchBarItem, Widget { notification.soundName = "Submarine" NSUserNotificationCenter.default.deliver(notification) } -} \ No newline at end of file +}