bs-unified-ui 1.0.920 → 1.0.922
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +8 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -45847,6 +45847,7 @@ var useNotificationsV2 = function (options) {
|
|
|
45847
45847
|
var onErrorRef = React.useRef(onError);
|
|
45848
45848
|
var onNotificationRef = React.useRef(onNotification);
|
|
45849
45849
|
var onConnectionChangeRef = React.useRef(onConnectionChange);
|
|
45850
|
+
var warehousesConfigRef = React.useRef(warehousesConfig);
|
|
45850
45851
|
// Track current pathname for display indicators
|
|
45851
45852
|
var currentPath = useCurrentPath();
|
|
45852
45853
|
// Check which page user is currently on
|
|
@@ -46217,7 +46218,7 @@ var useNotificationsV2 = function (options) {
|
|
|
46217
46218
|
case 1:
|
|
46218
46219
|
_a.trys.push([1, 3, 4, 5]);
|
|
46219
46220
|
fetchAudioRepeatInFlightRef.current = true;
|
|
46220
|
-
return [4 /*yield*/, serviceRef.current.getAudioRepeat(bsOrgId,
|
|
46221
|
+
return [4 /*yield*/, serviceRef.current.getAudioRepeat(bsOrgId, warehousesConfigRef.current)];
|
|
46221
46222
|
case 2:
|
|
46222
46223
|
response = _a.sent();
|
|
46223
46224
|
data = response === null || response === void 0 ? void 0 : response.data;
|
|
@@ -46863,6 +46864,11 @@ var useNotificationsV2 = function (options) {
|
|
|
46863
46864
|
}
|
|
46864
46865
|
}
|
|
46865
46866
|
});
|
|
46867
|
+
// Check condition 4: warehousesConfig changed
|
|
46868
|
+
if (warehousesConfigRef.current !== memoizedWarehousesConfig) {
|
|
46869
|
+
warehousesConfigRef.current = memoizedWarehousesConfig;
|
|
46870
|
+
shouldFetch = true;
|
|
46871
|
+
}
|
|
46866
46872
|
// Update refs for next comparison
|
|
46867
46873
|
prevReminderEventsRef.current = __assign({}, memoizedReminderEvents);
|
|
46868
46874
|
prevSoundConfigRef.current = {
|
|
@@ -46894,7 +46900,7 @@ var useNotificationsV2 = function (options) {
|
|
|
46894
46900
|
fetchAudioRepeatTimerRef.current = null;
|
|
46895
46901
|
}, 3000);
|
|
46896
46902
|
}
|
|
46897
|
-
}, [fetchAudioRepeat, memoizedSoundConfig, memoizedReminderEvents]);
|
|
46903
|
+
}, [fetchAudioRepeat, memoizedSoundConfig, memoizedReminderEvents, memoizedWarehousesConfig]);
|
|
46898
46904
|
// Restart interval when repeatingInterval or mute changes per group
|
|
46899
46905
|
React.useEffect(function () {
|
|
46900
46906
|
if (!memoizedSoundConfig)
|