feat: Add option to toggle editor icon in new notes list design (#799)
This commit is contained in:
@@ -35,6 +35,7 @@ export type DisplayOptions = {
|
||||
hideTags: boolean;
|
||||
hideNotePreview: boolean;
|
||||
hideDate: boolean;
|
||||
hideEditorIcon: boolean;
|
||||
};
|
||||
|
||||
export class NotesViewState {
|
||||
@@ -58,6 +59,7 @@ export class NotesViewState {
|
||||
hideTags: true,
|
||||
hideDate: false,
|
||||
hideNotePreview: false,
|
||||
hideEditorIcon: false,
|
||||
};
|
||||
|
||||
constructor(
|
||||
@@ -301,6 +303,10 @@ export class NotesViewState {
|
||||
PrefKey.NotesHideTags,
|
||||
true
|
||||
);
|
||||
freshDisplayOptions.hideEditorIcon = this.application.getPreference(
|
||||
PrefKey.NotesHideEditorIcon,
|
||||
false
|
||||
);
|
||||
const displayOptionsChanged =
|
||||
freshDisplayOptions.sortBy !== this.displayOptions.sortBy ||
|
||||
freshDisplayOptions.sortReverse !== this.displayOptions.sortReverse ||
|
||||
@@ -308,6 +314,8 @@ export class NotesViewState {
|
||||
freshDisplayOptions.showArchived !== this.displayOptions.showArchived ||
|
||||
freshDisplayOptions.showTrashed !== this.displayOptions.showTrashed ||
|
||||
freshDisplayOptions.hideProtected !== this.displayOptions.hideProtected ||
|
||||
freshDisplayOptions.hideEditorIcon !==
|
||||
this.displayOptions.hideEditorIcon ||
|
||||
freshDisplayOptions.hideTags !== this.displayOptions.hideTags;
|
||||
this.displayOptions = freshDisplayOptions;
|
||||
if (displayOptionsChanged) {
|
||||
|
||||
Reference in New Issue
Block a user