fix: correct monospace state name
This commit is contained in:
@@ -65,7 +65,7 @@ type EditorState = {
|
|||||||
noteStatus?: NoteStatus
|
noteStatus?: NoteStatus
|
||||||
tagsAsStrings?: string
|
tagsAsStrings?: string
|
||||||
marginResizersEnabled?: boolean
|
marginResizersEnabled?: boolean
|
||||||
monospaceEnabled?: boolean
|
monospaceFont?: boolean
|
||||||
isDesktop?: boolean
|
isDesktop?: boolean
|
||||||
syncTakingTooLong: boolean
|
syncTakingTooLong: boolean
|
||||||
showExtensions: boolean
|
showExtensions: boolean
|
||||||
@@ -952,7 +952,7 @@ class EditorViewCtrl extends PureViewCtrl implements EditorViewScope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async reloadPreferences() {
|
async reloadPreferences() {
|
||||||
const monospaceEnabled = this.application.getPrefsService().getValue(
|
const monospaceFont = this.application.getPrefsService().getValue(
|
||||||
WebPrefKey.EditorMonospaceEnabled,
|
WebPrefKey.EditorMonospaceEnabled,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
@@ -965,7 +965,7 @@ class EditorViewCtrl extends PureViewCtrl implements EditorViewScope {
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
await this.setEditorState({
|
await this.setEditorState({
|
||||||
monospaceEnabled,
|
monospaceFont,
|
||||||
spellcheck,
|
spellcheck,
|
||||||
marginResizersEnabled
|
marginResizersEnabled
|
||||||
});
|
});
|
||||||
@@ -1008,7 +1008,7 @@ class EditorViewCtrl extends PureViewCtrl implements EditorViewScope {
|
|||||||
if (!editor) {
|
if (!editor) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.getState().monospaceEnabled) {
|
if (this.getState().monospaceFont) {
|
||||||
if (this.getState().isDesktop) {
|
if (this.getState().isDesktop) {
|
||||||
editor.style.fontFamily = Fonts.DesktopMonospaceFamily;
|
editor.style.fontFamily = Fonts.DesktopMonospaceFamily;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user