From 757f43971c35e8976a0ab6c5400efb5ada950864 Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Thu, 11 Mar 2021 10:55:20 +0100 Subject: [PATCH] fix: reload search results when changing protected text search option --- app/assets/javascripts/views/notes/notes_view.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/views/notes/notes_view.ts b/app/assets/javascripts/views/notes/notes_view.ts index c43c949eecb..9d71f391b75 100644 --- a/app/assets/javascripts/views/notes/notes_view.ts +++ b/app/assets/javascripts/views/notes/notes_view.ts @@ -707,6 +707,8 @@ class NotesViewCtrl extends PureViewCtrl { 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 { event.preventDefault(); if (await this.application.authorizeSearchingProtectedNotesText()) { this.state.noteFilter.includeProtectedNoteText = true; + this.reloadNotesDisplayOptions(); + await this.reloadNotes(); } await this.$timeout(50); await this.setState({