diff options
author | Shav Kinderlehrer <[email protected]> | 2024-02-21 12:20:24 -0500 |
---|---|---|
committer | Shav Kinderlehrer <[email protected]> | 2024-02-21 12:20:24 -0500 |
commit | ce0be87c7f39e9763d835a685cb65eb38c7e68c3 (patch) | |
tree | a548887701d035f40923de1838317d213a8a2532 /Jel/Views/Dashboard | |
parent | 53b079259556532569af3af0e3b15aa887adbfd4 (diff) | |
download | jel-ce0be87c7f39e9763d835a685cb65eb38c7e68c3.tar.gz jel-ce0be87c7f39e9763d835a685cb65eb38c7e68c3.zip |
Cleanup + change SignInView to be a sheet
Diffstat (limited to 'Jel/Views/Dashboard')
-rw-r--r-- | Jel/Views/Dashboard/DashboardLibraryView.swift | 2 | ||||
-rw-r--r-- | Jel/Views/Dashboard/DashboardView.swift | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Jel/Views/Dashboard/DashboardLibraryView.swift b/Jel/Views/Dashboard/DashboardLibraryView.swift index 0510113..dc5189e 100644 --- a/Jel/Views/Dashboard/DashboardLibraryView.swift +++ b/Jel/Views/Dashboard/DashboardLibraryView.swift @@ -11,7 +11,7 @@ import JellyfinKit struct DashboardLibraryView: View { @EnvironmentObject var jellyfinClient: JellyfinClientController - @StateObject var authState: AuthStateController = AuthStateController.shared + @ObservedObject var authState: AuthStateController = AuthStateController.shared @State var libraries: [BaseItemDto] = [] @State var loading: Bool = true diff --git a/Jel/Views/Dashboard/DashboardView.swift b/Jel/Views/Dashboard/DashboardView.swift index 5ad25f8..931a884 100644 --- a/Jel/Views/Dashboard/DashboardView.swift +++ b/Jel/Views/Dashboard/DashboardView.swift @@ -10,6 +10,8 @@ import JellyfinKit struct DashboardView: View { @State var showingSettingsSheet: Bool = false + @ObservedObject var authState: AuthStateController = AuthStateController.shared + @State var refresh: Bool = true var body: some View { ScrollView { @@ -37,6 +39,9 @@ struct DashboardView: View { .sheet(isPresented: $showingSettingsSheet) { SettingsView(showingSettingsView: $showingSettingsSheet) } + .onChange(of: authState.loggedIn, { + refresh = !authState.loggedIn + }) } } |