mirror of
https://github.com/bitwarden/browser
synced 2025-01-01 12:47:57 +01:00
always set inactive state first
This commit is contained in:
parent
bc198c60d1
commit
c0fd5f71f8
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user