Дополнение в convertRecent

This commit is contained in:
Book Pauk
2022-07-11 16:26:03 +07:00
parent 4775d6e47b
commit 1b4360b897

View File

@@ -81,13 +81,14 @@ class BookManager {
for (const key in this.recent) {
const book = this.recent[key];
if (!book.path) {
continue;
}
const newKey = this.keyFromPath(book.path);
if (!book.deleted && key !== newKey) {
if (!book.deleted && key !== newKey || book.key !== newKey) {
this.recent[newKey] = _.cloneDeep(book);
this.recent[newKey].key = newKey;
book.deleted = 1;