Небольшие поправки
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user