mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-18 00:55:50 +00:00
Enhancement: Requery channels and streams after rehashing completes
This commit is contained in:
parent
5ed42432fc
commit
e4b312d136
2 changed files with 12 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Added
|
||||
|
||||
- Frontend now automatically refreshes streams and channels after a stream rehash completes, ensuring the UI is always up-to-date following backend merge operations.
|
||||
- Frontend Unit Tests: Added comprehensive unit tests for React hooks and Zustand stores, including:
|
||||
- `useLocalStorage` hook tests with localStorage mocking and error handling
|
||||
- `useSmartLogos` hook tests for logo loading and management
|
||||
|
|
|
|||
|
|
@ -700,6 +700,17 @@ export const WebsocketProvider = ({ children }) => {
|
|||
withCloseButton: true, // Allow manual close
|
||||
loading: false, // Remove loading indicator
|
||||
});
|
||||
// Requery streams and channels after rehash completes
|
||||
try {
|
||||
await API.requeryChannels();
|
||||
await API.requeryStreams();
|
||||
await useChannelsStore.getState().fetchChannels();
|
||||
} catch (error) {
|
||||
console.error(
|
||||
'Error refreshing channels/streams after rehash:',
|
||||
error
|
||||
);
|
||||
}
|
||||
} else if (parsedEvent.data.action === 'blocked') {
|
||||
// Handle blocked rehash attempt
|
||||
notifications.show({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue