multiple changes

This commit is contained in:
tiago.kayaya
2022-01-14 10:35:54 +01:00
parent 99e3ea2452
commit 896af7fc49
9 changed files with 18 additions and 15 deletions
@@ -44,7 +44,7 @@
<ion-label>A conversa original mantêm-se como chat individual</ion-label>
</div>
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of messages; let last = last">
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of wsChatMethodsService.getGroupRoom(roomId).massages; let last = last">
<div class="message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45" *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'ru' && msg.msg !=''" >
<div class="message-item-options d-flex justify-content-end">
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer"></fa-icon>
@@ -90,7 +90,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
private fileService: FileService,
public ThemeService: ThemeService,
private changeDetectorRef: ChangeDetectorRef,
//public wsChatMethodsService: WsChatMethodsService
public wsChatMethodsService: WsChatMethodsService
) {
this.loggedUserChat = authService.ValidatedUserChat['data'];
this.isGroupCreated = true;
@@ -101,11 +101,11 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
ngOnChanges(changes: SimpleChanges): void {
this.getRoomInfo();
//this.scrollToBottom();
//this.wsChatMethodsService.getRoom(this.roomId).loadHistory();
this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory();
console.log('MESSAGES'+this.wsChatMethodsService.getGroupRoom(this.roomId).massages);
}
ngOnInit() {
alert('Here')
//console.log(this.wsChatMethodsService.getRoom(this.roomId).massages);
this.loggedUser=this.loggedUserChat;
@@ -37,7 +37,7 @@
</ion-refresher-content>
</ion-refresher>
<div class="messages" #scrollMe>
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of wsChatMethodsService.getRoom(roomId).massages; let last = last">
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of wsChatMethodsService.getDmRoom(roomId).massages; let last = last">
<div class='message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45' *ngIf="msg.msg !=''">
<div class="message-item-options d-flex justify-content-end">
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer"></fa-icon>
@@ -84,7 +84,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.loggedUser = authService.ValidatedUserChat['data'];
}
ngOnChanges(changes: SimpleChanges): void {
this.wsChatMethodsService.getRoom(this.roomId).loadHistory()
this.wsChatMethodsService.getDmRoom(this.roomId).loadHistory()
}
ngOnInit() {
@@ -214,7 +214,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
sendMessage() {
this.wsChatMethodsService.getRoom(this.roomId).send(this.message)
this.wsChatMethodsService.getDmRoom(this.roomId).send(this.message)
this.message = "";
}