@amityco/ts-sdk-react-native 7.15.1-5052487.0 → 7.15.1-60e034d4.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/commentRepository/events/utils.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,4BAA4B,UAChC,MAAM,MAAM,iBAAiB,YAC1B,MAAM,QAAQ,CAAC,MAAM,eAAe,CAAC,uBA0FhD,CAAC;AAEF,eAAO,MAAM,iCAAiC,UACrC,MAAM,KACX,MAAM,kBAAkB,EACxB,2BAA2B,GAAG,8BAA8B,CAC7D,YACS,MAAM,QAAQ,CAAC,MAAM,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/commentRepository/events/utils.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,4BAA4B,UAChC,MAAM,MAAM,iBAAiB,YAC1B,MAAM,QAAQ,CAAC,MAAM,eAAe,CAAC,uBA0FhD,CAAC;AAEF,eAAO,MAAM,iCAAiC,UACrC,MAAM,KACX,MAAM,kBAAkB,EACxB,2BAA2B,GAAG,8BAA8B,CAC7D,YACS,MAAM,QAAQ,CAAC,MAAM,eAAe,CAAC,uBAmIhD,CAAC"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -18017,8 +18017,10 @@ const createLocalCommentEventSubscriber = (event, callback) => {
|
|
|
18017
18017
|
else {
|
|
18018
18018
|
const postCacheKey = ['post', 'get', comments[0].referenceId];
|
|
18019
18019
|
const postCache = (_a = pullFromCache(postCacheKey)) === null || _a === void 0 ? void 0 : _a.data;
|
|
18020
|
-
|
|
18021
|
-
|
|
18020
|
+
if (postCache) {
|
|
18021
|
+
const updatedPostCache = Object.assign(Object.assign({}, postCache), { comments: [...postCache.comments, (_b = comments[0]) === null || _b === void 0 ? void 0 : _b.commentId] });
|
|
18022
|
+
pushToCache(postCacheKey, updatedPostCache);
|
|
18023
|
+
}
|
|
18022
18024
|
}
|
|
18023
18025
|
const queries = (_c = queryCache(['comment', 'query'])) === null || _c === void 0 ? void 0 : _c.filter(({ key }) => { var _a; return ((_a = key[2]) === null || _a === void 0 ? void 0 : _a.referenceId) === comment.data.referenceId; });
|
|
18024
18026
|
queries === null || queries === void 0 ? void 0 : queries.map(({ key, data }) => upsertInCache(key, data, { cachedAt: -1 }));
|
package/dist/index.esm.js
CHANGED
|
@@ -34090,8 +34090,10 @@ const createLocalCommentEventSubscriber = (event, callback) => {
|
|
|
34090
34090
|
else {
|
|
34091
34091
|
const postCacheKey = ['post', 'get', comments[0].referenceId];
|
|
34092
34092
|
const postCache = (_a = pullFromCache(postCacheKey)) === null || _a === void 0 ? void 0 : _a.data;
|
|
34093
|
-
|
|
34094
|
-
|
|
34093
|
+
if (postCache) {
|
|
34094
|
+
const updatedPostCache = Object.assign(Object.assign({}, postCache), { comments: [...postCache.comments, (_b = comments[0]) === null || _b === void 0 ? void 0 : _b.commentId] });
|
|
34095
|
+
pushToCache(postCacheKey, updatedPostCache);
|
|
34096
|
+
}
|
|
34095
34097
|
}
|
|
34096
34098
|
const queries = (_c = queryCache(['comment', 'query'])) === null || _c === void 0 ? void 0 : _c.filter(({ key }) => { var _a; return ((_a = key[2]) === null || _a === void 0 ? void 0 : _a.referenceId) === comment.data.referenceId; });
|
|
34097
34099
|
queries === null || queries === void 0 ? void 0 : queries.map(({ key, data }) => upsertInCache(key, data, { cachedAt: -1 }));
|