mirror of
				https://github.com/avatao-content/frontend-tutorial-framework
				synced 2025-11-04 15:32:56 +00:00 
			
		
		
		
	Rename old handler for easier comprehension
This commit is contained in:
		@@ -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();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user