From 732733f115a863408a339e164ff88f1022c46101 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 11 Aug 2022 02:23:58 +0300 Subject: [PATCH] add a todo for future --- src/modules/serverSideStorage.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/serverSideStorage.js b/src/modules/serverSideStorage.js index 11e66220..bff8e4ba 100644 --- a/src/modules/serverSideStorage.js +++ b/src/modules/serverSideStorage.js @@ -110,6 +110,9 @@ export const _mergeFlags = (recent, stale, allFlagKeys) => { } const _mergeJournal = (a, b) => uniqWith( + // TODO use groupBy to group by path, then trim them depending on operations, + // i.e. if field got removed in the end - no need to sort it beforehand, if field + // got re-added no need to remove it and add it etc. [ ...(Array.isArray(a) ? a : []), ...(Array.isArray(b) ? b : [])