Поправки синхронизации

This commit is contained in:
Book Pauk
2019-10-21 22:03:00 +07:00
parent 158118d183
commit b0e7431e72
2 changed files with 54 additions and 52 deletions

View File

@@ -542,10 +542,12 @@ class Reader extends Vue {
if (value) { if (value) {
await utils.sleep(500); await utils.sleep(500);
while (!this.$refs.serverStorage.inited) await utils.sleep(100); while (!this.$refs.serverStorage.inited ||
while (!bookManager.loaded) await utils.sleep(100); !bookManager.loaded ||
this.$refs.serverStorage.savingRecent)
await utils.sleep(100);
this.$refs.serverStorage.saveRecent(value); await this.$refs.serverStorage.saveRecent(value);
} }
} }
} }

View File

@@ -435,6 +435,8 @@ class ServerStorage extends Vue {
if (!this.keyInited || !this.serverSyncEnabled || this.savingRecent) if (!this.keyInited || !this.serverSyncEnabled || this.savingRecent)
return; return;
this.savingRecent = true;
try {
const bm = bookManager; const bm = bookManager;
let needSaveRecent = false; let needSaveRecent = false;
@@ -491,8 +493,6 @@ class ServerStorage extends Vue {
} }
//сохранение //сохранение
this.savingRecent = true;
try {
let result = {state: ''}; let result = {state: ''};
try { try {