@capillarytech/creatives-library 9.0.61-alpha.2 → 9.0.61-alpha.3
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/package.json
CHANGED
|
@@ -19,6 +19,9 @@ export const EMPTY_INJECTED_TAGS = {};
|
|
|
19
19
|
export const EMPTY_TAGS = [];
|
|
20
20
|
export const EMPTY_TEMPLATE_DATA = {};
|
|
21
21
|
|
|
22
|
+
// Cap + Viber each inject v2ViberSagas; module counter lets only the first task start takeLatest watchers (avoids duplicate API calls).
|
|
23
|
+
export let viberSagasActive = 0;
|
|
24
|
+
|
|
22
25
|
export const UPLOAD_VIBER_ASSET_REQUEST = 'app/v2Containers/Viber/UPLOAD_ASSET_REQUEST';
|
|
23
26
|
export const UPLOAD_VIBER_ASSET_SUCCESS = 'app/v2Containers/Viber/UPLOAD_ASSET_SUCCESS';
|
|
24
27
|
export const UPLOAD_VIBER_ASSET_FAILURE = 'app/v2Containers/Viber/UPLOAD_ASSET_FAILURE';
|
|
@@ -6,6 +6,7 @@ import { pollAssetStatus } from '../../sagas/assetPolling';
|
|
|
6
6
|
import { createPollingConfig } from '../../utils/asyncAssetUpload';
|
|
7
7
|
import { ASSET_STATUS } from '../../utils/assetStatusConstants';
|
|
8
8
|
import * as types from './constants';
|
|
9
|
+
import { viberSagasActive } from './constants';
|
|
9
10
|
import messages from './messages';
|
|
10
11
|
|
|
11
12
|
export function* uploadViberAsset(params) {
|
|
@@ -149,10 +150,18 @@ export default [
|
|
|
149
150
|
];
|
|
150
151
|
|
|
151
152
|
export function* v2ViberSagas() {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
153
|
+
if (viberSagasActive > 0) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
viberSagasActive += 1;
|
|
157
|
+
try {
|
|
158
|
+
yield all([
|
|
159
|
+
watchUploadViberAsset(),
|
|
160
|
+
watchCreateTemplate(),
|
|
161
|
+
watchGetTemplateDetails(),
|
|
162
|
+
watchEditTemplate(),
|
|
163
|
+
]);
|
|
164
|
+
} finally {
|
|
165
|
+
viberSagasActive -= 1;
|
|
166
|
+
}
|
|
158
167
|
}
|