Merge pull request #1918 from TriliumNext/feat/note-edit-readonly-fix2

Store initial "automatic read-only" decision, so that actively edited Note doesn't transition to read-only
This commit is contained in:
Elian Doran
2025-06-06 19:42:15 +03:00
committed by GitHub
2 changed files with 30 additions and 5 deletions

View File

@@ -48,6 +48,13 @@ export interface ViewScope {
viewMode?: ViewMode;
attachmentId?: string;
readOnlyTemporarilyDisabled?: boolean;
/**
* If true, it indicates that the note in the view should be opened in read-only mode (for supported note types such as text or code).
*
* The reason why we store this information here is that a note can become read-only as the user types content in it, and we wouldn't want
* to immediately enter read-only mode.
*/
isReadOnly?: boolean;
highlightsListPreviousVisible?: boolean;
highlightsListTemporarilyHidden?: boolean;
tocTemporarilyHidden?: boolean;