Track the subscription

This commit is contained in:
RMidhunSuresh 2022-08-24 19:40:11 +05:30
parent 205ecdc52e
commit f718034f2b

View File

@ -96,7 +96,7 @@ export class SessionViewModel extends ViewModel {
} }
_setupForcedLogoutOnAccessTokenInvalidation() { _setupForcedLogoutOnAccessTokenInvalidation() {
this._client.sync.status.subscribe(status => { this.track(this._client.sync.status.subscribe(status => {
if (status === SyncStatus.Stopped) { if (status === SyncStatus.Stopped) {
const error = this._client.sync.error; const error = this._client.sync.error;
if (error?.errcode === "M_UNKNOWN_TOKEN") { if (error?.errcode === "M_UNKNOWN_TOKEN") {
@ -109,7 +109,7 @@ export class SessionViewModel extends ViewModel {
this.navigation.applyPath(path); this.navigation.applyPath(path);
} }
} }
}); }));
} }
get id() { get id() {