mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-22 22:30:52 +01:00
only update playlist editor when open
This commit is contained in:
parent
350e72b8d7
commit
aba4ddf2db
@ -81,8 +81,10 @@ const useFurniturePlaylistEditorWidgetState = () =>
|
|||||||
simpleAlert(LocalizeText('playlist.editor.alert.playlist.full'), NotificationAlertType.ALERT, '', '', LocalizeText('playlist.editor.alert.playlist.full.title'));
|
simpleAlert(LocalizeText('playlist.editor.alert.playlist.full'), NotificationAlertType.ALERT, '', '', LocalizeText('playlist.editor.alert.playlist.full.title'));
|
||||||
});
|
});
|
||||||
|
|
||||||
const onFurniListUpdated = useCallback((event : IMessageEvent) =>
|
const onFurniListUpdated = (event : IMessageEvent) =>
|
||||||
{
|
{
|
||||||
|
if(objectId === -1) return;
|
||||||
|
|
||||||
if(event instanceof FurnitureListEvent)
|
if(event instanceof FurnitureListEvent)
|
||||||
{
|
{
|
||||||
if(event.getParser().fragmentNumber === 0)
|
if(event.getParser().fragmentNumber === 0)
|
||||||
@ -94,7 +96,7 @@ const useFurniturePlaylistEditorWidgetState = () =>
|
|||||||
{
|
{
|
||||||
GetNitroInstance().soundManager.musicController?.requestUserSongDisks();
|
GetNitroInstance().soundManager.musicController?.requestUserSongDisks();
|
||||||
}
|
}
|
||||||
}, []);
|
}
|
||||||
|
|
||||||
useMessageEvent(FurnitureListEvent, onFurniListUpdated);
|
useMessageEvent(FurnitureListEvent, onFurniListUpdated);
|
||||||
useMessageEvent(FurnitureListRemovedEvent, onFurniListUpdated);
|
useMessageEvent(FurnitureListRemovedEvent, onFurniListUpdated);
|
||||||
|
Loading…
Reference in New Issue
Block a user