From 20b74a9dcdf8921d8f0ccfc61f91f67b7a09f305 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Wed, 23 Oct 2019 20:42:14 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C=D1=88?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Reader/Reader.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/components/Reader/Reader.vue b/client/components/Reader/Reader.vue index fc37ac4b..54e73f8c 100644 --- a/client/components/Reader/Reader.vue +++ b/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}));