This commit is contained in:
tiago.kayaya
2021-07-26 09:44:11 +01:00
parent 6a0e65393b
commit 03d52e0918
8 changed files with 82 additions and 78 deletions
+4 -7
View File
@@ -103,7 +103,6 @@ export class ChatPage implements OnInit {
){
this.loggedUserChat = authService.ValidatedUserChat['data'];
this.headers = new HttpHeaders();
this.loadMessage();
}
ngOnInit() {
@@ -140,16 +139,16 @@ hideRefreshButton(){
}
loadMessage(){
/* loadMessage(){
this.chatService.messages.subscribe(msg => {
console.log("Response from websocket: " + msg);
});
}
sendMsg() {
} */
/* sendMsg() {
console.log("new message from client to websocket: ", this.message);
this.chatService.messages.next(this.message);
this.message.msg = "";
}
} */
/* Fim websockets functions */
@@ -168,9 +167,7 @@ sendMsg() {
this.showEmptyComponent=true;
}
openGroupContactsPage(data){
console.log(data);
this.groupRoomId = data;
console.log(this.groupRoomId);
this.closeAllDesktopComponents();
if(window.innerWidth <= 1024){
@@ -37,7 +37,7 @@
<ion-label>Esta conversa passou a grupo</ion-label><br />
<ion-label>A conversa original mantêm-se como chat individual</ion-label>
</div>
<div *ngFor="let msg of messages" class="messages">
<div *ngFor="let msg of messages" class="messages" #scrollMe>
<div *ngIf="msg.t != 'r'" class='incoming-{{msg.u.username!=loggedUser.me.username}}'>
<div class="title">
<ion-label>{{msg.u.name}}</ion-label>
+2 -3
View File
@@ -49,8 +49,8 @@ export class MessagesPage implements OnInit, AfterViewChecked {
/* setInterval(()=>{ */
this.load();
/* }, 9000); */
this.el = document.getElementById("scrollToBottom");
this.el.scrollTop = this.el.scrollHeight - this.el.scrollTop;
/* this.el = document.getElementById("scrollToBottom");
this.el.scrollTop = this.el.scrollHeight - this.el.scrollTop; */
}
@@ -78,7 +78,6 @@ export class MessagesPage implements OnInit, AfterViewChecked {
try {
this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;
} catch(err) { }
}
sendMessage(){