fix: reload search results when changing protected text search option

This commit is contained in:
Baptiste Grob
2021-03-11 10:55:20 +01:00
parent d4d4e4b185
commit 757f43971c

View File

@@ -707,6 +707,8 @@ class NotesViewCtrl extends PureViewCtrl<unknown, NotesState> {
this.searchBarInput?.[0].focus();
if (this.state.noteFilter.includeProtectedNoteText) {
this.state.noteFilter.includeProtectedNoteText = false;
this.reloadNotesDisplayOptions();
await this.reloadNotes();
} else {
this.setState({
authorizingSearchOptions: true,
@@ -714,6 +716,8 @@ class NotesViewCtrl extends PureViewCtrl<unknown, NotesState> {
event.preventDefault();
if (await this.application.authorizeSearchingProtectedNotesText()) {
this.state.noteFilter.includeProtectedNoteText = true;
this.reloadNotesDisplayOptions();
await this.reloadNotes();
}
await this.$timeout(50);
await this.setState({