mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
always set inactive state first
This commit is contained in:
@@ -88,21 +88,15 @@ export class NotificationsService implements NotificationsServiceAbstraction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async reconnectFromActivity(): Promise<void> {
|
async reconnectFromActivity(): Promise<void> {
|
||||||
if (!this.inited) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.inactive = false;
|
this.inactive = false;
|
||||||
if (!this.connected) {
|
if (this.inited && !this.connected) {
|
||||||
await this.reconnect(true);
|
await this.reconnect(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async disconnectFromInactivity(): Promise<void> {
|
async disconnectFromInactivity(): Promise<void> {
|
||||||
if (!this.inited) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.inactive = true;
|
this.inactive = true;
|
||||||
if (this.connected) {
|
if (this.inited && this.connected) {
|
||||||
await this.signalrConnection.stop();
|
await this.signalrConnection.stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user