fix(ui): keep the NowPlayingPanel badge in sync.
Introduced a new event, EVENT_STREAM_RECONNECTED, to track the last timestamp of stream reconnections. This change updates the activity reducer to handle the new event and modifies the NowPlayingPanel to refresh data based on server and stream status. Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
@@ -2,6 +2,7 @@ export const EVENT_SCAN_STATUS = 'scanStatus'
|
||||
export const EVENT_SERVER_START = 'serverStart'
|
||||
export const EVENT_REFRESH_RESOURCE = 'refreshResource'
|
||||
export const EVENT_NOW_PLAYING_COUNT = 'nowPlayingCount'
|
||||
export const EVENT_STREAM_RECONNECTED = 'streamReconnected'
|
||||
|
||||
export const processEvent = (type, data) => ({
|
||||
type,
|
||||
@@ -21,3 +22,8 @@ export const serverDown = () => ({
|
||||
type: EVENT_SERVER_START,
|
||||
data: {},
|
||||
})
|
||||
|
||||
export const streamReconnected = () => ({
|
||||
type: EVENT_STREAM_RECONNECTED,
|
||||
data: {},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user