Browse Source

Небольшие поправки

Book Pauk 3 years ago
parent
commit
04713f47c8
1 changed files with 13 additions and 2 deletions
  1. 13 2
      client/components/Reader/RecentBooksPage/RecentBooksPage.vue

+ 13 - 2
client/components/Reader/RecentBooksPage/RecentBooksPage.vue

@@ -264,6 +264,7 @@ class RecentBooksPage {
             this.showBar();
             this.showBar();
             await this.updateTableData();
             await this.updateTableData();
             await this.scrollToActiveBook();
             await this.scrollToActiveBook();
+            //await this.scrollRefresh();
         })();
         })();
     }
     }
 
 
@@ -435,8 +436,6 @@ class RecentBooksPage {
             //.....
             //.....
 
 
             this.tableData = result;
             this.tableData = result;
-            
-            this.$refs.virtualScroll.refresh();
         } finally {
         } finally {
             this.lock.ret();
             this.lock.ret();
         }
         }
@@ -569,6 +568,8 @@ class RecentBooksPage {
     }
     }
 
 
     async scrollToActiveBook() {
     async scrollToActiveBook() {
+        await this.$nextTick();
+
         this.lockScroll = true;
         this.lockScroll = true;
         try {
         try {
             let activeIndex = -1;
             let activeIndex = -1;
@@ -614,6 +615,16 @@ class RecentBooksPage {
         }
         }
     }
     }
 
 
+    async scrollRefresh() {
+        this.lockScroll = true;
+        await utils.sleep(100);
+        try {
+            this.$refs.virtualScroll.refresh();
+        } finally {
+            await utils.sleep(100);
+            this.lockScroll = false;
+        }
+    }
 
 
     get sortMethodOptions() {
     get sortMethodOptions() {
         return [
         return [