mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
start
This commit is contained in:
committed by
Aiden McClelland
parent
b7bd147c76
commit
0c6a0218a6
@@ -84,8 +84,6 @@ export class AppComponent {
|
||||
this.http.authReqEnabled = true
|
||||
this.showMenu = true
|
||||
this.patch.start()
|
||||
// watch patch DB to display name and unread count
|
||||
this.watchPatch()
|
||||
this.connectionService.start()
|
||||
// watch connection to display connectivity issues
|
||||
this.watchConnection(auth)
|
||||
@@ -111,13 +109,6 @@ export class AppComponent {
|
||||
})
|
||||
}
|
||||
|
||||
watchPatch (): void {
|
||||
this.patch.watch$('server-info', 'unread-notification-count')
|
||||
.subscribe(unread => {
|
||||
this.unreadCount = unread
|
||||
})
|
||||
}
|
||||
|
||||
private watchConnection (auth: AuthState): void {
|
||||
this.connectionService.watchFailure$()
|
||||
.pipe(
|
||||
@@ -194,6 +185,7 @@ export class AppComponent {
|
||||
finalize(() => console.log('FINALIZING!!!')),
|
||||
)
|
||||
.subscribe(count => {
|
||||
this.unreadCount = count
|
||||
if (previous !== undefined && count > previous) this.presentToastNotifications()
|
||||
previous = count
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user