Update:Home page refetch items when scanning in first items

This commit is contained in:
advplyr 2024-09-18 15:30:24 -05:00
parent 013c7c776e
commit 12bce48ef5

View File

@ -347,6 +347,13 @@ export default {
libraryItemsAdded(libraryItems) {
console.log('libraryItems added', libraryItems)
// First items added to library
const isThisLibrary = libraryItems.some((li) => li.libraryId === this.currentLibraryId)
if (!this.shelves.length && !this.search && isThisLibrary) {
this.fetchCategories()
return
}
const recentlyAddedShelf = this.shelves.find((shelf) => shelf.id === 'recently-added')
if (!recentlyAddedShelf) return