fix: update library in store when deleting book in bookshelf, closes #1178 (#1191)

This commit is contained in:
Huang Xin
2025-05-19 14:31:25 +08:00
committed by GitHub
parent eb71c59524
commit 554d786105
+1 -1
View File
@@ -28,7 +28,7 @@ export const useLibraryStore = create<LibraryState>((set, get) => ({
if (bookIndex !== -1) {
library[bookIndex] = book;
}
set({ library });
set({ library: [...library] });
appService.saveLibraryBooks(library);
},
}));