mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-04-03 11:52:40 +00:00
Rename old handler for easier comprehension
This commit is contained in:
parent
9908965a07
commit
ef4f467457
@ -38,7 +38,7 @@ export class MessagesComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.newMessage.subscribe(this.handleMessage.bind(this));
|
this.newMessage.subscribe(this.writeMessage.bind(this));
|
||||||
this.messageQueueAttender.messageInQueue.subscribe(
|
this.messageQueueAttender.messageInQueue.subscribe(
|
||||||
(value) => this.messageInQueue = value
|
(value) => this.messageInQueue = value
|
||||||
);
|
);
|
||||||
@ -55,7 +55,7 @@ export class MessagesComponent implements OnInit {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleMessage(data: MessagesMessage) {
|
writeMessage(data: MessagesMessage) {
|
||||||
data.message = this.convert(data.message);
|
data.message = this.convert(data.message);
|
||||||
this.messages.push(data);
|
this.messages.push(data);
|
||||||
this.changeDetectorRef.detectChanges();
|
this.changeDetectorRef.detectChanges();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user