Reset markdown preview state on certain conditions

This commit is contained in:
2026-01-31 16:13:35 +01:00
parent b6187d1338
commit 5855de1a2f

View File

@@ -331,6 +331,7 @@ export default function App() {
setDraftBaseVersionId(null);
setViewingVersion(null);
setSelectedHistoryId(null);
setMarkdownPreview(false);
historySnapshotRef.current = null;
return;
}
@@ -367,6 +368,7 @@ export default function App() {
setSelectedHistoryId(
draft ? `draft:${selectedTextId}` : manualVersion?.id ?? null
);
setMarkdownPreview(false);
historySnapshotRef.current = null;
};