Merge branch 'feature/websocket' of https://bitbucket.org/equilibriumito/gabinete-digital into feature/websocket

This commit is contained in:
tiago.kayaya
2022-01-14 15:07:43 +01:00
6 changed files with 51 additions and 30 deletions
@@ -103,6 +103,12 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
//this.scrollToBottom();
this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory();
console.log('MESSAGES'+this.wsChatMethodsService.getGroupRoom(this.roomId).massages);
this.wsChatMethodsService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked
setTimeout(()=>{
this.scrollToBottomClicked()
}, 50)
}
ngOnInit() {
@@ -141,7 +147,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
} catch(err) { }
}
scrollToBottomClicked(): void {
scrollToBottomClicked = () => {
try {
this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;
} catch(err) { }