Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ defkorean <https://github.com/defkorean>
Michael Lappas <https://github.com/michaellappas>
Brett Schwartz <brettschwartz871@gmail.com>
Lovro Boban <lovro.boban@hotmail.com>
Yuuki Gabriele Patriarca <yuukigpatriarca@gmail.com>
Yuuki Gabriele Patriarca <yuukigpatriarca@gmail.com>
SecretX <https://github.com/SecretX33>

********************
Expand Down
7 changes: 1 addition & 6 deletions ts/editor/NoteEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
plainTextsHidden,
plainTextDefaults,
},
modTimeOfNotetype: notetypeMeta.modTime,
};
}
}
Expand Down Expand Up @@ -155,7 +154,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html

export function setPlainTexts(defaultPlainTexts: boolean[]): void {
const states = sessionOptions[notetypeMeta?.id]?.fieldStates;
if (states) {
if (states && states.richTextsHidden.length === defaultPlainTexts.length) {
richTextsHidden = states.richTextsHidden;
plainTextsHidden = states.plainTextsHidden;
plainTextDefaults = states.plainTextDefaults;
Expand Down Expand Up @@ -240,10 +239,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
let notetypeMeta: NotetypeIdAndModTime;
function setNotetypeMeta({ id, modTime }: NotetypeIdAndModTime): void {
notetypeMeta = { id, modTime };
// Discard the saved state of the fields if the notetype has been modified.
if (sessionOptions[id]?.modTimeOfNotetype !== modTime) {
delete sessionOptions[id];
}
if (isImageOcclusion) {
getImageOcclusionFields({
notetypeId: BigInt(notetypeMeta.id),
Expand Down
1 change: 0 additions & 1 deletion ts/editor/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export type EditorOptions = {
plainTextsHidden: boolean[];
plainTextDefaults: boolean[];
};
modTimeOfNotetype: number;
};

export type SessionOptions = {
Expand Down