mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-05-04 03:09:12 -05:00
wip
This commit is contained in:
@@ -70,7 +70,7 @@ export default class SearchBoxWidget extends BasicWidget {
|
||||
|
||||
this.$saveSearchButton.on('click', () => this.saveSearch());
|
||||
|
||||
this.$closeSearchButton.on('click', () => this.triggerCommand('hideSearch'));
|
||||
this.$closeSearchButton.on('click', () => this.hideSearch());
|
||||
|
||||
return this.$widget;
|
||||
}
|
||||
@@ -142,7 +142,7 @@ export default class SearchBoxWidget extends BasicWidget {
|
||||
this.$searchInput.trigger('focus');
|
||||
}
|
||||
|
||||
hideSearchEvent() {
|
||||
hideSearch() {
|
||||
this.resetSearchEvent();
|
||||
|
||||
this.$searchBox.slideUp();
|
||||
@@ -155,7 +155,7 @@ export default class SearchBoxWidget extends BasicWidget {
|
||||
this.showSearchEvent();
|
||||
}
|
||||
else {
|
||||
this.hideSearchEvent();
|
||||
this.hideSearch();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,10 +79,12 @@ export default class TabAwareWidget extends BasicWidget {
|
||||
}
|
||||
|
||||
// when note is both switched and activated, this should not produce double refresh
|
||||
async tabNoteSwitchedAndActivatedEvent() {
|
||||
this.tabContext = appContext.tabManager.getActiveTabContext();
|
||||
async tabNoteSwitchedAndActivatedEvent({tabId, notePath}) {
|
||||
if (this.isTab(tabId) && this.notePath === notePath) {
|
||||
this.tabContext = appContext.tabManager.getActiveTabContext();
|
||||
|
||||
await this.refresh();
|
||||
await this.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
async treeCacheReloadedEvent() {
|
||||
|
||||
@@ -575,7 +575,15 @@ export default class TabRowWidget extends BasicWidget {
|
||||
return closestIndex;
|
||||
};
|
||||
|
||||
tabNoteSwitchedAndActivatedEvent({tabId}) {
|
||||
this.updateTabById(tabId);
|
||||
}
|
||||
|
||||
tabNoteSwitchedEvent({tabId}) {
|
||||
this.updateTabById(tabId);
|
||||
}
|
||||
|
||||
updateTabById(tabId) {
|
||||
const $tab = this.getTabById(tabId);
|
||||
|
||||
const {note} = appContext.tabManager.getTabContextById(tabId);
|
||||
|
||||
Reference in New Issue
Block a user