mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
save
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user