Поправки синхронизации
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user