Listening preview and some more patches
This commit is contained in:
@@ -59,7 +59,7 @@ const useSettingsState = <T extends SectionSettings>(
|
||||
}, [dispatch, module, sectionId]);
|
||||
|
||||
|
||||
const updateLocalAndScheduleGlobal = useCallback((updates: Partial<T>) => {
|
||||
const updateLocalAndScheduleGlobal = useCallback((updates: Partial<T>, schedule: boolean = true) => {
|
||||
setLocalSettings(prev => ({
|
||||
...prev,
|
||||
...updates
|
||||
@@ -69,7 +69,9 @@ const useSettingsState = <T extends SectionSettings>(
|
||||
...pendingUpdatesRef.current,
|
||||
...updates
|
||||
};
|
||||
debouncedUpdateGlobal();
|
||||
if (schedule) {
|
||||
debouncedUpdateGlobal();
|
||||
}
|
||||
}, [debouncedUpdateGlobal]);
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user