mirror of
https://github.com/block-core/angor-hub-old.git
synced 2026-01-29 22:54:21 +01:00
Update relay.service.ts
This commit is contained in:
@@ -88,7 +88,11 @@ export class RelayService {
|
||||
}
|
||||
|
||||
public connectToRelays() {
|
||||
this.relays.forEach((relay) => this.connectToRelay(relay));
|
||||
this.relays.forEach((relay) => {
|
||||
if (!relay.connected) {
|
||||
this.connectToRelay(relay);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public async ensureConnectedRelays(): Promise<void> {
|
||||
@@ -106,6 +110,7 @@ export class RelayService {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private setupVisibilityChangeHandling() {
|
||||
document.addEventListener('visibilitychange', () => {
|
||||
if (document.visibilityState === 'visible') {
|
||||
|
||||
Reference in New Issue
Block a user