mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-08-04 07:42:47 +00:00
Update the frontend on logo change.
This commit is contained in:
parent
3cb5a061c9
commit
7e13e51198
1 changed files with 13 additions and 1 deletions
|
|
@ -418,9 +418,21 @@ export const WebsocketProvider = ({ children }) => {
|
|||
loading: false,
|
||||
autoClose: 6000,
|
||||
});
|
||||
// Refresh channels data
|
||||
// Refresh channels data and logos
|
||||
try {
|
||||
await API.requeryChannels();
|
||||
await useChannelsStore.getState().fetchChannels();
|
||||
|
||||
// Get updated channel data and extract logo IDs to load
|
||||
const channels = useChannelsStore.getState().channels;
|
||||
const logoIds = Object.values(channels)
|
||||
.filter((channel) => channel.logo_id)
|
||||
.map((channel) => channel.logo_id);
|
||||
|
||||
// Fetch the specific logos that were just assigned
|
||||
if (logoIds.length > 0) {
|
||||
await useLogosStore.getState().fetchLogosByIds(logoIds);
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn(
|
||||
'Failed to refresh channels after logo setting:',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue