From 235ad3bfb396275ef0f1f72745cdd30fba983772 Mon Sep 17 00:00:00 2001 From: Neil Enns Date: Sun, 12 Jan 2025 15:33:15 -0800 Subject: [PATCH] Changing station on a station volume controller doesn't force a refresh of station state Fixes #377 --- .../stationVolume/updateStationVolumeSettings.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/events/streamDeck/stationVolume/updateStationVolumeSettings.ts b/src/events/streamDeck/stationVolume/updateStationVolumeSettings.ts index ac76ea3..9b3731a 100644 --- a/src/events/streamDeck/stationVolume/updateStationVolumeSettings.ts +++ b/src/events/streamDeck/stationVolume/updateStationVolumeSettings.ts @@ -1,6 +1,7 @@ import { StationVolumeSettings } from "@actions/stationVolume"; import { DialAction } from "@elgato/streamdeck"; import actionManager from "@managers/action"; +import trackAudioManager from "@managers/trackAudio"; /** * Updates the settings associated with a station volume action. @@ -19,5 +20,11 @@ export const handleUpdateStationVolumeSettings = ( return; } + const refreshRequired = savedAction.callsign !== settings.callsign; + savedAction.settings = settings; + + if (refreshRequired) { + trackAudioManager.refreshStationState(savedAction.callsign); + } };