mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
Fix unassigned filter not updating after adding streams to channels
When a stream was added to a channel (via "Add to Channel" button, "Create New Channel", or bulk "Add Streams to Channel"), the StreamsTable data wasn't being refetched. This caused streams to remain visible even when the "Only Unassociated" filter was active, despite no longer being unassociated. Fixed by calling fetchData() after channel updates in: - StreamRowActions.addStreamToChannel (single stream to channel) - addStreamsToChannel (bulk add to channel) - executeSingleChannelCreation (create new channel from stream) Now streams immediately disappear from the filtered view when associated with a channel.
This commit is contained in:
parent
cbde9297ea
commit
367ee26f9a
1 changed files with 10 additions and 0 deletions
|
|
@ -70,6 +70,7 @@ const StreamRowActions = ({
|
|||
handleWatchStream,
|
||||
selectedChannelIds,
|
||||
createChannelFromStream,
|
||||
fetchData,
|
||||
}) => {
|
||||
const [tableSize, _] = useLocalStorage('table-size', 'default');
|
||||
const channelSelectionStreams = useChannelsTableStore(
|
||||
|
|
@ -87,6 +88,7 @@ const StreamRowActions = ({
|
|||
],
|
||||
});
|
||||
await API.requeryChannels();
|
||||
await fetchData();
|
||||
};
|
||||
|
||||
const onEdit = useCallback(() => {
|
||||
|
|
@ -545,6 +547,10 @@ const StreamsTable = ({ onReady }) => {
|
|||
|
||||
// Clear selection since the task has started
|
||||
setSelectedStreamIds([]);
|
||||
|
||||
// Note: This is a background task, so fetchData may not show updated data immediately
|
||||
// The actual update will occur when the WebSocket event fires on task completion
|
||||
await fetchData();
|
||||
} catch (error) {
|
||||
console.error('Error starting bulk channel creation:', error);
|
||||
// Error notifications will be handled by WebSocket
|
||||
|
|
@ -714,6 +720,7 @@ const StreamsTable = ({ onReady }) => {
|
|||
await API.requeryChannels();
|
||||
const fetchLogos = useChannelsStore.getState().fetchLogos;
|
||||
fetchLogos();
|
||||
await fetchData();
|
||||
};
|
||||
|
||||
// Handle confirming the single channel numbering modal
|
||||
|
|
@ -756,6 +763,7 @@ const StreamsTable = ({ onReady }) => {
|
|||
],
|
||||
});
|
||||
await API.requeryChannels();
|
||||
await fetchData();
|
||||
};
|
||||
|
||||
const onRowSelectionChange = (updatedIds) => {
|
||||
|
|
@ -916,6 +924,7 @@ const StreamsTable = ({ onReady }) => {
|
|||
handleWatchStream={handleWatchStream}
|
||||
selectedChannelIds={selectedChannelIds}
|
||||
createChannelFromStream={createChannelFromStream}
|
||||
fetchData={fetchData}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
@ -927,6 +936,7 @@ const StreamsTable = ({ onReady }) => {
|
|||
editStream,
|
||||
deleteStream,
|
||||
handleWatchStream,
|
||||
fetchData,
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue