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
@@ -94,7 +94,14 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.modalController.dismiss();
}
};
this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory();
this.wsChatMethodsService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked;
setTimeout(()=>{
this.scrollToBottomClicked()
}, 50)
}
ngOnInit() {
@@ -204,7 +211,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
} catch(err) { }
}
scrollToBottomClicked(): void {
scrollToBottomClicked = () => {
try {
this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;
} catch(err) { }
+6 -1
View File
@@ -109,6 +109,11 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
};
this.wsChatMethodsService.getDmRoom(this.roomId).loadHistory()
this.wsChatMethodsService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked
setTimeout(()=>{
this.scrollToBottomClicked()
}, 50)
}
@@ -283,7 +288,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
} catch (err) { }
}
scrollToBottomClicked(): void {
scrollToBottomClicked = () => {
try {
this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;
} catch (err) { }