show connection bar right away (#1849)

This commit is contained in:
Matt Hill
2022-10-03 09:59:49 -06:00
committed by GitHub
parent afb4536247
commit 719cd5512c
2 changed files with 5 additions and 5 deletions

View File

@@ -1,12 +1,12 @@
import { Component } from '@angular/core'
import { combineLatest, map, Observable } from 'rxjs'
import { ChangeDetectionStrategy, Component } from '@angular/core'
import { combineLatest, map, Observable, startWith } from 'rxjs'
import { ConnectionService } from 'src/app/services/connection.service'
@Component({
selector: 'connection-bar',
templateUrl: './connection-bar.component.html',
styleUrls: ['./connection-bar.component.scss'],
// changeDetection: ChangeDetectionStrategy.OnPush,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ConnectionBarComponent {
private readonly websocket$ = this.connectionService.websocketConnected$
@@ -19,7 +19,7 @@ export class ConnectionBarComponent {
dots: boolean
}> = combineLatest([
this.connectionService.networkConnected$,
this.websocket$,
this.websocket$.pipe(startWith(false)),
]).pipe(
map(([network, websocket]) => {
if (!network)