Skip to content

Commit

Permalink
fix: Don't carry over loaded bookmarks into the bookmarks or shared view
Browse files Browse the repository at this point in the history
fixes #2167

Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Jun 6, 2024
1 parent a9bf3bd commit a586bbc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/ViewPrivate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default {
watch: {
$route: 'onRoute',
async showFolderOverview(value) {
if (!this.initialLoad) {
if (!this.initialLoad && value) {
// hack to make bookmarkslist rerender
await this.$store.dispatch(actions.RELOAD_VIEW)
}
Expand Down Expand Up @@ -139,6 +139,9 @@ export default {
async onRoute() {
const route = this.$route
this.$store.commit(mutations.RESET_SELECTION)
if (typeof this.$store.state.loading.bookmarks === 'function') {
this.$store.state.loading.bookmarks()
}
switch (route.name) {
case privateRoutes.HOME:
this.$store.dispatch(actions.FILTER_BY_FOLDER, { folder: '-1' })
Expand All @@ -159,13 +162,14 @@ export default {
this.$store.dispatch(actions.FILTER_BY_DUPLICATED)
break
case privateRoutes.TRASHBIN:
this.$store.commit(mutations.FETCH_END, 'bookmarks')
await this.$store.dispatch(actions.LOAD_DELETED_BOOKMARKS)
await this.$store.dispatch(actions.LOAD_DELETED_FOLDERS)
break
case privateRoutes.SHARED_FOLDERS:
await this.$store.dispatch(actions.LOAD_SHARED_FOLDERS)
this.$store.commit(mutations.REMOVE_ALL_BOOKMARKS)
this.$store.commit(mutations.FETCH_END, 'bookmarks')
await this.$store.dispatch(actions.LOAD_SHARED_FOLDERS)
break
case privateRoutes.BOOKMARK:
await this.$store.dispatch(actions.LOAD_BOOKMARK, route.params.bookmark)
Expand Down

0 comments on commit a586bbc

Please sign in to comment.