Book Pauk 6 lat temu
rodzic
commit
70be3d10d0
1 zmienionych plików z 9 dodań i 1 usunięć
  1. 9 1
      client/components/Reader/share/bookManager.js

+ 9 - 1
client/components/Reader/share/bookManager.js

@@ -79,9 +79,10 @@ class BookManager {
             }
             }
         }
         }
 
 
+        let key = null;
         len = await bmRecentStore.length();
         len = await bmRecentStore.length();
         for (let i = 0; i < len; i++) {
         for (let i = 0; i < len; i++) {
-            const key = await bmRecentStore.key(i);
+            key = await bmRecentStore.key(i);
             let r = await bmRecentStore.getItem(key);
             let r = await bmRecentStore.getItem(key);
             if (_.isObject(r)) {
             if (_.isObject(r)) {
                 this.recent[r.key] = r;
                 this.recent[r.key] = r;
@@ -90,6 +91,13 @@ class BookManager {
             }
             }
         }
         }
 
 
+        //размножение для дебага
+        /*if (key) {
+            for (let i = 0; i < 1000; i++) {
+                const k = this.keyFromUrl(i.toString());
+                this.recent[k] = Object.assign({}, _.cloneDeep(this.recent[key]), {key: k, touchTime: Date.now() - 1000000});
+            }
+        }*/
         await this.cleanBooks();
         await this.cleanBooks();
         await this.cleanRecentBooks();
         await this.cleanRecentBooks();