correctly wait for catchup sync

This commit is contained in:
Bruno Windels 2020-05-04 19:38:23 +02:00
parent 225fe873be
commit 1fa14a99e9
2 changed files with 2 additions and 2 deletions

View file

@ -25,7 +25,7 @@ export class SessionLoadViewModel extends ViewModel {
this.emitChange();
// wait for initial sync, but not catchup sync
const isCatchupSync = s === LoadStatus.FirstSync &&
this._sessionContainer.sync.status === SyncStatus.CatchupSync;
this._sessionContainer.sync.status.get() === SyncStatus.CatchupSync;
return isCatchupSync ||
s === LoadStatus.LoginFailed ||
s === LoadStatus.Error ||

View file

@ -159,8 +159,8 @@ export class SessionContainer {
async _waitForFirstSync() {
try {
this._status.set(LoadStatus.FirstSync);
this._sync.start();
this._status.set(LoadStatus.FirstSync);
} catch (err) {
// swallow ConnectionError here and continue,
// as the reconnector above will call