remove unused parameter
This commit is contained in:
parent
619849f987
commit
f92748871e
1 changed files with 3 additions and 3 deletions
|
@ -114,7 +114,7 @@ export const canRedo: Readable<boolean> = derived([patchIndex, patches], ([$patc
|
||||||
export function applyGlobal(callback: (files: Map<string, GPXFile>) => void) {
|
export function applyGlobal(callback: (files: Map<string, GPXFile>) => void) {
|
||||||
const [newFileState, patch, inversePatch] = produceWithPatches(fileState, callback);
|
const [newFileState, patch, inversePatch] = produceWithPatches(fileState, callback);
|
||||||
|
|
||||||
appendPatches(patch, inversePatch, true);
|
appendPatches(patch, inversePatch);
|
||||||
|
|
||||||
return commitFileStateChange(newFileState, patch);
|
return commitFileStateChange(newFileState, patch);
|
||||||
}
|
}
|
||||||
|
@ -129,12 +129,12 @@ function applyToFiles(fileIds: string[], callback: (file: GPXFile) => void) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
appendPatches(patch, inversePatch, false);
|
appendPatches(patch, inversePatch);
|
||||||
|
|
||||||
return commitFileStateChange(newFileState, patch);
|
return commitFileStateChange(newFileState, patch);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function appendPatches(patch: Patch[], inversePatch: Patch[], global: boolean) {
|
async function appendPatches(patch: Patch[], inversePatch: Patch[]) {
|
||||||
if (get(patchIndex) !== undefined) {
|
if (get(patchIndex) !== undefined) {
|
||||||
db.patches.where(':id').above(get(patchIndex)).delete();
|
db.patches.where(':id').above(get(patchIndex)).delete();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue