aboutsummaryrefslogtreecommitdiff
path: root/Hotline/HotlineState.swift
diff options
context:
space:
mode:
authorDustin Mierau <dustin@mierau.me>2023-12-06 13:52:20 -0800
committerDustin Mierau <dustin@mierau.me>2023-12-06 13:52:20 -0800
commitc0068f11c51bb587c16dfacb73629b3c6fb67fc8 (patch)
tree20753433f348b03bb590e0fe6a4cafbe56f4c859 /Hotline/HotlineState.swift
parent06a2166415bca7e5fe32eac505859bdd690ab8e0 (diff)
Further work on UI organization
Diffstat (limited to 'Hotline/HotlineState.swift')
-rw-r--r--Hotline/HotlineState.swift24
1 files changed, 24 insertions, 0 deletions
diff --git a/Hotline/HotlineState.swift b/Hotline/HotlineState.swift
new file mode 100644
index 0000000..9ae4940
--- /dev/null
+++ b/Hotline/HotlineState.swift
@@ -0,0 +1,24 @@
+import Foundation
+import SwiftUI
+
+@Observable
+class HotlineState {
+ var agreementPresented = false
+ var trackerPresented = true
+
+ func presentTracker() {
+ self.trackerPresented = true
+ }
+
+ func dismissTracker() {
+ self.trackerPresented = false
+ }
+
+ func presentAgreement() {
+ self.agreementPresented = true
+ }
+
+ func dismissAgreement() {
+ self.agreementPresented = false
+ }
+}