diff options
| author | Dustin Mierau <dustin@mierau.me> | 2023-12-20 09:43:59 -0800 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2023-12-20 09:43:59 -0800 |
| commit | f58b0da88077b3129c2321b4af82b807c6d38ebf (patch) | |
| tree | 20b280106770c0733059894a87844617edf8bdcf /Hotline | |
| parent | 980b82d42eb8e5160f0495ad6f4472b1fc649bfe (diff) | |
Remove HotlineState class for now. Not maintaining global state info yet.
Diffstat (limited to 'Hotline')
| -rw-r--r-- | Hotline/Application.swift | 3 | ||||
| -rw-r--r-- | Hotline/HotlineState.swift | 24 | ||||
| -rw-r--r-- | Hotline/iOS/NewsView.swift | 1 |
3 files changed, 0 insertions, 28 deletions
diff --git a/Hotline/Application.swift b/Hotline/Application.swift index 2b25ba5..14717c2 100644 --- a/Hotline/Application.swift +++ b/Hotline/Application.swift @@ -3,8 +3,6 @@ import SwiftData @main struct Application: App { - @State private var appState = HotlineState() - #if os(iOS) private var model = Hotline(trackerClient: HotlineTrackerClient(), client: HotlineClient()) #endif @@ -13,7 +11,6 @@ struct Application: App { #if os(iOS) WindowGroup { TrackerView() - .environment(appState) .environment(model) } #elseif os(macOS) diff --git a/Hotline/HotlineState.swift b/Hotline/HotlineState.swift deleted file mode 100644 index 9ae4940..0000000 --- a/Hotline/HotlineState.swift +++ /dev/null @@ -1,24 +0,0 @@ -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 - } -} diff --git a/Hotline/iOS/NewsView.swift b/Hotline/iOS/NewsView.swift index 92e8303..6d3ad45 100644 --- a/Hotline/iOS/NewsView.swift +++ b/Hotline/iOS/NewsView.swift @@ -247,6 +247,5 @@ struct NewsView: View { #Preview { MessageBoardView() - .environment(HotlineState()) .environment(Hotline(trackerClient: HotlineTrackerClient(), client: HotlineClient())) } |