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

This commit is contained in:
Book Pauk
2019-10-23 20:42:14 +07:00
parent 3b848a5a86
commit 20b74a9dcd

View File

@@ -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}));