aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HoloBar/HoloBarApp.swift10
1 files changed, 4 insertions, 6 deletions
diff --git a/HoloBar/HoloBarApp.swift b/HoloBar/HoloBarApp.swift
index eb28f7f..e8d678a 100644
--- a/HoloBar/HoloBarApp.swift
+++ b/HoloBar/HoloBarApp.swift
@@ -26,17 +26,15 @@ struct HoloBarApp: App {
}
Divider()
+
#if DEBUG
Button("Simulate Day Change") {
NotificationCenter.default.post(name: .NSCalendarDayChanged, object: nil)
}
#endif
- Button("Refresh") {
- refreshCharacters()
- }
- Button("Quit") {
- NSApplication.shared.terminate(nil)
- }
+
+ Button("Refresh", action: refreshCharacters)
+ Button("Quit", action: { NSApplication.shared.terminate(nil) })
}
.onReceive(NotificationCenter.default.publisher(for: .NSCalendarDayChanged)) { _ in
refreshCharacters()