mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-13 17:22:37 +02:00
autosave on undo/redo
This commit is contained in:
parent
64fddb63c2
commit
58d3c5eebb
1 changed files with 5 additions and 1 deletions
|
|
@ -149,6 +149,8 @@ function reducer(state: State, action: Action): State {
|
||||||
const inverse = state.inversePatches[state.currentIndex - 1];
|
const inverse = state.inversePatches[state.currentIndex - 1];
|
||||||
draft.present = applyPatches(state.present, inverse);
|
draft.present = applyPatches(state.present, inverse);
|
||||||
draft.currentIndex--;
|
draft.currentIndex--;
|
||||||
|
draft.present.pendingChanges = true;
|
||||||
|
draft.present.chatKey++;
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -158,6 +160,8 @@ function reducer(state: State, action: Action): State {
|
||||||
const patch = state.patches[state.currentIndex];
|
const patch = state.patches[state.currentIndex];
|
||||||
draft.present = applyPatches(state.present, patch);
|
draft.present = applyPatches(state.present, patch);
|
||||||
draft.currentIndex++;
|
draft.currentIndex++;
|
||||||
|
draft.present.pendingChanges = true;
|
||||||
|
draft.present.chatKey++;
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue