aboutsummaryrefslogtreecommitdiff
path: root/front-end/src/store/bookmarks.ts
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-01-22 01:42:43 -0500
committerLibravatar vnugent <public@vaughnnugent.com>2024-01-22 01:42:43 -0500
commit32553068b151712100826b6de6b0c68f7f46f9cc (patch)
treeb1e2c5203aaf2c7e8f4c44c6f4a9886c39756072 /front-end/src/store/bookmarks.ts
parenta44f7b7dc089776a7817cf077b3f3ae3db7fc22e (diff)
remove unused code, fix ci license file issue
Diffstat (limited to 'front-end/src/store/bookmarks.ts')
-rw-r--r--front-end/src/store/bookmarks.ts12
1 files changed, 7 insertions, 5 deletions
diff --git a/front-end/src/store/bookmarks.ts b/front-end/src/store/bookmarks.ts
index a49937b..b6430f7 100644
--- a/front-end/src/store/bookmarks.ts
+++ b/front-end/src/store/bookmarks.ts
@@ -218,15 +218,17 @@ export const bookmarkPlugin = (bookmarkEndpoint: MaybeRef<string>): PiniaPlugin
}
//Update the total bookmarks
- apiCall(async () => totalBookmarks.value = await bookmarkApi.count())
- apiCall(async () => allTags.value = await bookmarkApi.getTags())
+ apiCall(async () => {
+ allTags.value = await bookmarkApi.getTags()
+ totalBookmarks.value = await bookmarkApi.count()
+ })
})
//Watch for serach query changes
- watchDebounced([currentPage, currentPageSize, totalBookmarks, tags, query, allTags],
- ([ page, pageSize, _, tags, query ]) => {
+ watchDebounced([currentPage, currentPageSize, tags, query, allTags],
+ ([ page, pageSize, tags, query ]) => {
apiCall(async () => bookmarks.value = await bookmarkApi.list(page, pageSize, { tags, query }))
- }, { debounce: 10 })
+ }, { debounce: 50 })
//Watch for page changes and scroll to top
watch([currentPage], () => window.scrollTo({ top: 0, behavior: 'smooth' }))