Remove notes tags display

This commit is contained in:
Mo Bitar
2020-04-17 13:57:43 -05:00
parent 0c6b5cbeb7
commit 8050c9cccd
6 changed files with 37 additions and 47 deletions

View File

@@ -186,7 +186,6 @@ export class AppState {
);
}
addAppEventObserver() {
this.unsubApp = this.application.addEventObserver(async (eventName) => {
if (eventName === ApplicationEvent.Started) {
@@ -254,14 +253,14 @@ export class AppState {
}
/** Returns the tags that are referncing this note */
getNoteTags(note: SNNote) {
public getNoteTags(note: SNNote) {
return this.application.referencingForItem(note).filter((ref) => {
return ref.content_type === ContentType.Tag;
}) as SNTag[]
}
/** Returns the notes this tag references */
getTagNotes(tag: SNTag) {
public getTagNotes(tag: SNTag) {
if (tag.isSmartTag()) {
return this.application.notesMatchingSmartTag(tag as SNSmartTag);
} else {
@@ -271,7 +270,7 @@ export class AppState {
}
}
getSelectedTag() {
public getSelectedTag() {
return this.selectedTag;
}

View File

@@ -887,13 +887,14 @@ class EditorViewCtrl extends PureViewCtrl implements EditorViewScope {
}
}
if (newRelationships.length > 0) {
await this.application.changeAndSaveItems(
await this.application.changeItems(
Uuids(newRelationships),
(mutator) => {
mutator.addItemAsRelationship(note);
}
)
}
this.application.sync();
this.reloadTagsString();
}

View File

@@ -94,13 +94,6 @@
faded="self.state.hideDate"
label="'Date'"
)
menu-row(
action="self.selectedMenuItem(); self.toggleWebPrefKey('hideTags')"
circle="self.state.hideTags ? 'danger' : 'success'"
desc="'Hide the list of tags associated with each note'"
faded="self.state.hideTags"
label="'Tags'"
)
.scrollable
#notes-scrollable.infinite-scroll(
can-load='true',

View File

@@ -32,7 +32,6 @@ type NotesState = {
hidePinned?: boolean
hideNotePreview?: boolean
hideDate?: boolean
hideTags?: boolean
noteFilter: { text: string }
mutable: { showMenu: boolean }
}
@@ -367,10 +366,6 @@ class NotesViewCtrl extends PureViewCtrl {
WebPrefKey.NotesHideDate,
false
);
viewOptions.hideTags = this.application!.getPrefsService().getValue(
WebPrefKey.NotesHideTags,
false
);
await this.setNotesState({
...viewOptions
});
@@ -394,8 +389,8 @@ class NotesViewCtrl extends PureViewCtrl {
onPanelResize(
newWidth: number,
lastLeft: number,
isAtMaxWidth: boolean,
_: number,
__: boolean,
isCollapsed: boolean
) {
this.application!.getPrefsService().setUserPrefValue(

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long