69432: Remove immediatePatch and replace usage with patch

This commit is contained in:
Kristof De Langhe
2020-03-12 16:24:47 +01:00
parent 20f8f913cf
commit c1bd6938a7
4 changed files with 10 additions and 44 deletions

View File

@@ -104,9 +104,8 @@ export class ServerSyncBufferEffects {
map((entry: ObjectCacheEntry) => {
if (isNotEmpty(entry.patches)) {
const flatPatch: Operation[] = [].concat(...entry.patches.map((patch) => patch.operations));
const objectPatch = flatPatch.filter((op: Operation) => op.path.startsWith('/metadata'));
if (isNotEmpty(objectPatch)) {
this.requestService.configure(new PatchRequest(this.requestService.generateRequestId(), href, objectPatch));
if (isNotEmpty(flatPatch)) {
this.requestService.configure(new PatchRequest(this.requestService.generateRequestId(), href, flatPatch));
}
}
return new ApplyPatchObjectCacheAction(href);