mirror of
https://github.com/Toxblh/MTMR.git
synced 2026-01-11 17:38:38 +00:00
Removed whitelines and semicolons
This commit is contained in:
parent
5f876acc72
commit
0fabc660a2
@ -36,7 +36,7 @@ class PomodoroBarItem: CustomButtonTouchBarItem, Widget {
|
|||||||
}
|
}
|
||||||
//Vars are used for pausing the timer.
|
//Vars are used for pausing the timer.
|
||||||
private var started = false
|
private var started = false
|
||||||
private var timerPaused: Bool = false;
|
private var timerPaused: Bool = false
|
||||||
|
|
||||||
private let defaultTitle = ""
|
private let defaultTitle = ""
|
||||||
private let workTime: TimeInterval
|
private let workTime: TimeInterval
|
||||||
@ -66,25 +66,22 @@ class PomodoroBarItem: CustomButtonTouchBarItem, Widget {
|
|||||||
}
|
}
|
||||||
@objc func startStopWork() {
|
@objc func startStopWork() {
|
||||||
if !started {
|
if !started {
|
||||||
started = true;
|
started = true
|
||||||
typeTime = .work
|
typeTime = .work
|
||||||
startStopTimer()
|
startStopTimer()
|
||||||
} else {
|
} else {
|
||||||
if timerPaused {
|
if timerPaused {
|
||||||
timerPaused = false;
|
timerPaused = false
|
||||||
resumeTimer();
|
resumeTimer()
|
||||||
} else {
|
} else {
|
||||||
timerPaused = true;
|
timerPaused = true
|
||||||
pauseTimer();
|
pauseTimer()
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print("short")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc func startStopRest() {
|
@objc func startStopRest() {
|
||||||
print("looong")
|
started = false
|
||||||
started = false;
|
|
||||||
typeTime = .rest
|
typeTime = .rest
|
||||||
startStopTimer()
|
startStopTimer()
|
||||||
}
|
}
|
||||||
@ -95,12 +92,12 @@ class PomodoroBarItem: CustomButtonTouchBarItem, Widget {
|
|||||||
|
|
||||||
func resumeTimer() {
|
func resumeTimer() {
|
||||||
guard let timervalue = timer else { return }
|
guard let timervalue = timer else { return }
|
||||||
timervalue.resume();
|
timervalue.resume()
|
||||||
}
|
}
|
||||||
|
|
||||||
func pauseTimer() {
|
func pauseTimer() {
|
||||||
guard let timervalue = timer else { return }
|
guard let timervalue = timer else { return }
|
||||||
timervalue.suspend();
|
timervalue.suspend()
|
||||||
}
|
}
|
||||||
|
|
||||||
private func start() {
|
private func start() {
|
||||||
@ -152,6 +149,4 @@ class PomodoroBarItem: CustomButtonTouchBarItem, Widget {
|
|||||||
notification.soundName = "Submarine"
|
notification.soundName = "Submarine"
|
||||||
NSUserNotificationCenter.default.deliver(notification)
|
NSUserNotificationCenter.default.deliver(notification)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user