From c5165d348c1efbcc553b3c31dbeaa23353914fb6 Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Tue, 28 Oct 2025 10:06:33 -0700 Subject: Some state cleanup and banner color caching in ServerState. --- Hotline/MacApp.swift | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'Hotline/MacApp.swift') diff --git a/Hotline/MacApp.swift b/Hotline/MacApp.swift index dd7e190..89db36e 100644 --- a/Hotline/MacApp.swift +++ b/Hotline/MacApp.swift @@ -192,26 +192,12 @@ struct Application: App { .defaultSize(width: 690, height: 760) .defaultPosition(.center) .onChange(of: activeServerState) { - AppState.shared.activeServerState = activeServerState - } - .onChange(of: activeHotline) { - AppState.shared.activeHotline = activeHotline - } - .onChange(of: activeHotline?.serverTitle) { - if let hotline = activeHotline { - AppState.shared.activeServerName = hotline.serverTitle - } - } - .onChange(of: activeHotline?.bannerImage) { withAnimation { - AppState.shared.activeServerBanner = activeHotline?.bannerImage + AppState.shared.activeServerState = activeServerState } } .onChange(of: activeHotline) { AppState.shared.activeHotline = activeHotline - if let hotline = activeHotline { - AppState.shared.activeServerName = hotline.serverTitle - } } .commands { CommandGroup(replacing: .newItem) { -- cgit