Skip to content

Commit

Permalink
fix: favorite shared views
Browse files Browse the repository at this point in the history
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
  • Loading branch information
elzody committed Mar 12, 2024
1 parent 63cf2f8 commit 134ecb9
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/modules/navigation/sections/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,22 @@ export default {
}).filter(view => view.title.toLowerCase().includes(this.filterString.toLowerCase()))
},
getSharedViews() {
const sharedTableIds = this.getFilteredTables.map(table => table.id)
return this.views.filter(view => {
return view.isShared && view.ownership !== getCurrentUser().uid && !sharedTableIds.includes(view.tableId)
return view.isShared && view.ownership !== getCurrentUser().uid
}).filter(view => view.title.toLowerCase().includes(this.filterString.toLowerCase()))
},
getFavoriteTables() {
return this.getAllNodes.filter(node => !node.tableId && node.favorite)
},
getFavoriteViews() {
return this.getAllNodes.filter(node => node.tableId && node.favorite)
},
getFavoriteNodes() {
return this.getAllNodes.filter(node => node.favorite)
const favoriteViews = this.getFavoriteViews.filter(view => {
return !this.getFavoriteTables.map(t => t.id).includes(view.tableId)
})
return [...this.getFavoriteTables, ...favoriteViews]
},
getArchivedTables() {
return this.getFilteredTables.filter(node => node.archived)
Expand Down

0 comments on commit 134ecb9

Please sign in to comment.