Skip to content

Commit

Permalink
Merge pull request #380 from neilenns/neilenns/issue377
Browse files Browse the repository at this point in the history
Force refresh of station dials when callsign changes
  • Loading branch information
neilenns authored Jan 12, 2025
2 parents e3694df + 235ad3b commit fb4459e
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -19,5 +20,11 @@ export const handleUpdateStationVolumeSettings = (
return;
}

const refreshRequired = savedAction.callsign !== settings.callsign;

savedAction.settings = settings;

if (refreshRequired) {
trackAudioManager.refreshStationState(savedAction.callsign);
}
};

0 comments on commit fb4459e

Please sign in to comment.