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

This commit is contained in:
Book Pauk
2019-09-20 22:44:36 +07:00
parent 5198f8aa60
commit 26747b7013

View File

@@ -77,6 +77,7 @@ class ServerStorage extends Vue {
if (eventName == 'recent-changed') { if (eventName == 'recent-changed') {
if (itemKey) { if (itemKey) {
if (!this.recentDeltaInited) { if (!this.recentDeltaInited) {
await this.loadRecent();
this.warning('Функции сохранения на сервер пока недоступны'); this.warning('Функции сохранения на сервер пока недоступны');
return; return;
} }
@@ -362,9 +363,11 @@ class ServerStorage extends Vue {
} }
async loadRecent(skipRevCheck = false, doNotifySuccess = true) { async loadRecent(skipRevCheck = false, doNotifySuccess = true) {
if (!this.keyInited || !this.serverSyncEnabled) if (!this.keyInited || !this.serverSyncEnabled || this.loadingRecent)
return; return;
this.loadingRecent = true;
try {
const oldRecentRev = bookManager.recentRev; const oldRecentRev = bookManager.recentRev;
const oldRecentDeltaRev = bookManager.recentDeltaRev; const oldRecentDeltaRev = bookManager.recentDeltaRev;
//проверим ревизию на сервере //проверим ревизию на сервере
@@ -430,6 +433,9 @@ class ServerStorage extends Vue {
if (doNotifySuccess) if (doNotifySuccess)
this.debouncedNotifySuccess(); this.debouncedNotifySuccess();
} finally {
this.loadingRecent = false;
}
} }
async saveRecent(itemKey, recurse) { async saveRecent(itemKey, recurse) {