Улучшение синхронизации
This commit is contained in:
@@ -390,7 +390,7 @@ class ServerStorage extends Vue {
|
|||||||
this.debouncedNotifySuccess();
|
this.debouncedNotifySuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
async saveRecent(itemKey) {
|
async saveRecent(itemKey, recurse) {
|
||||||
if (!this.keyInited || !this.serverSyncEnabled || this.savingRecent)
|
if (!this.keyInited || !this.serverSyncEnabled || this.savingRecent)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -468,6 +468,11 @@ class ServerStorage extends Vue {
|
|||||||
if (result.state == 'reject') {
|
if (result.state == 'reject') {
|
||||||
await this.loadRecent(true, false);
|
await this.loadRecent(true, false);
|
||||||
this.warning(`Последние изменения отменены. Данные синхронизированы с сервером.`);
|
this.warning(`Последние изменения отменены. Данные синхронизированы с сервером.`);
|
||||||
|
if (!recurse) {
|
||||||
|
this.savingRecent = false;
|
||||||
|
this.saveRecent(itemKey, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else if (result.state == 'success') {
|
} else if (result.state == 'success') {
|
||||||
this.oldRecent = _.cloneDeep(bm.recent);
|
this.oldRecent = _.cloneDeep(bm.recent);
|
||||||
this.recentDiff = null;
|
this.recentDiff = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user