Skip to content

Commit

Permalink
fixed restoring of previously selected tags
Browse files Browse the repository at this point in the history
  • Loading branch information
pbek committed Jan 26, 2019
1 parent 8ff8033 commit 0c1ce3c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 19.1.11
- added support to show a success message from QOwnNotes if bookmarks were created
- you need QOwnNotes 19.1.9 or higher for this feature
- fixed restoring of previously selected tags
- added more translation

## 19.1.10
Expand Down
12 changes: 11 additions & 1 deletion app/pages/popup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,17 @@
// console.log("after load");
// console.log(that.pagination.page);
that.pagination.page = data.pagination.page;
that.selectedTags = data.selectedTags;
that.selectedTags = [];
const tags = that.allTags;
// check if we can add stored selected tags
if (data.selectedTags !== undefined && data.selectedTags.length > 0 && tags.length > 0) {
data.selectedTags.forEach(function (tag) {
if (tags.indexOf(tag) > -1) {
that.selectedTags.push(tag);
}
});
}
} );
} else if (type === "flashMessage") {
that.snackbar = true;
Expand Down

0 comments on commit 0c1ce3c

Please sign in to comment.