Skip to content

Commit

Permalink
fix: reload search results when changing protected text search option
Browse files Browse the repository at this point in the history
  • Loading branch information
arielsvg committed Mar 11, 2021
1 parent d4d4e4b commit 757f439
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/assets/javascripts/views/notes/notes_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -707,13 +707,17 @@ 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,
});
event.preventDefault();
if (await this.application.authorizeSearchingProtectedNotesText()) {
this.state.noteFilter.includeProtectedNoteText = true;
this.reloadNotesDisplayOptions();
await this.reloadNotes();
}
await this.$timeout(50);
await this.setState({
Expand Down

0 comments on commit 757f439

Please sign in to comment.