File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ import {Injectable} from '@angular/core';
4
4
import { PedalPiMessageDecoder } from './pedalpi-message-decoder' ;
5
5
import { ConnectionView } from './connection-view' ;
6
6
7
+ import { ApplicationRef } from '@angular/core' ;
8
+
7
9
8
10
export interface MessageDecoder {
9
11
onMessage ( message : any ) ;
@@ -26,7 +28,7 @@ export class WebSocketService {
26
28
27
29
public view : ConnectionView ;
28
30
29
- constructor ( private data : DataService ) {
31
+ constructor ( private data : DataService , private ref : ApplicationRef ) {
30
32
this . forceReconnection = false ;
31
33
32
34
this . messageDecoder = new PedalPiMessageDecoder ( data ) ;
@@ -58,6 +60,7 @@ export class WebSocketService {
58
60
private onMessage ( message ) {
59
61
message = JSON . parse ( message ) ;
60
62
this . messageDecoder . onMessage ( message ) ;
63
+ this . ref . tick ( ) ;
61
64
}
62
65
63
66
private onConnectionOpen ( url ) {
You can’t perform that action at this time.
0 commit comments