1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-06-25 10:25:36 +02:00

always set inactive state first

This commit is contained in:
Kyle Spearrin 2018-08-24 15:21:28 -04:00
parent bc198c60d1
commit c0fd5f71f8

View File

@ -88,21 +88,15 @@ export class NotificationsService implements NotificationsServiceAbstraction {
}
async reconnectFromActivity(): Promise<void> {
if (!this.inited) {
return;
}
this.inactive = false;
if (!this.connected) {
if (this.inited && !this.connected) {
await this.reconnect(true);
}
}
async disconnectFromInactivity(): Promise<void> {
if (!this.inited) {
return;
}
this.inactive = true;
if (this.connected) {
if (this.inited && this.connected) {
await this.signalrConnection.stop();
}
}