Преглед на файлове

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

Book Pauk преди 5 години
родител
ревизия
20b74a9dcd
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      client/components/Reader/Reader.vue

+ 3 - 1
client/components/Reader/Reader.vue

@@ -295,7 +295,9 @@ class Reader extends Vue {
             this.updateRoute();
         }, 1000);
 
-        this.debouncedSetRecentBook = _.debounce(async(newValue) => {
+        this.debouncedSetRecentBook = _.throttle(async(newValue) => {
+            await utils.sleep(300);
+            
             const recent = this.mostRecentBook();
             if (recent && (recent.bookPos != newValue || recent.bookPosSeen !== this.bookPosSeen)) {
                 await bookManager.setRecentBook(Object.assign({}, recent, {bookPos: newValue, bookPosSeen: this.bookPosSeen}));