mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2024-12-05 02:41:32 +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() {
|
||||
this.newMessage.subscribe(this.handleMessage.bind(this));
|
||||
this.newMessage.subscribe(this.writeMessage.bind(this));
|
||||
this.messageQueueAttender.messageInQueue.subscribe(
|
||||
(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);
|
||||
this.messages.push(data);
|
||||
this.changeDetectorRef.detectChanges();
|
||||
|
Loading…
Reference in New Issue
Block a user