duplicate roms bug fix

This commit is contained in:
Eudes Inácio
2022-02-02 10:37:57 +01:00
parent 2c35fe2c41
commit bd316d9e17
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -143,8 +143,8 @@ export class ChatPage implements OnInit {
ngOnInit() {
console.log(this.wsChatMethodsService.dm);
console.log(this.wsChatMethodsService.group);
console.log('Rooms INDIVIDUAIS',this.wsChatMethodsService._dm);
console.log(' ROOMS GROUP',this.wsChatMethodsService._group);
this.segment = "Contactos";
@@ -102,7 +102,7 @@
<div *ngIf="msg.attachments" class="message-attachments">
<div *ngFor="let file of msg.attachments">
<div *ngIf="msg.file.type == 'application/img'" (click)="openPreview(msg)">
<img *ngIf="msg.image_url" src="{{msg.image_url}}" alt="image" >
<img *ngIf="msg.file.image_url" src="{{msg.file.image_url}}" alt="image" >
<ion-icon *ngIf="msg.file.image_url == null" name="download-outline"></ion-icon>
</div>
<div *ngIf="msg.file.type != 'application/img'">
@@ -99,10 +99,10 @@ export class WsChatMethodsService {
async getAllRooms () {
this.loadingWholeList = true
this.getRoomFromDb();
//this.getRoomFromDb();
const rooms = await this.WsChatService.getRooms();
this.storage.set('Rooms', rooms);
await this.storage.remove('Rooms');
await this.storage.set('Rooms', rooms);
// console.log("ROOMS" + JSON.stringify(rooms))
this.WsChatService.registerCallback({
@@ -78,7 +78,7 @@
<div *ngIf="msg.attachments" class="message-attachments">
<div *ngFor="let file of msg.attachments">
<div *ngIf="msg.file.type == 'application/img'" (click)="openPreview(msg)">
<img *ngIf="file.image_url" src="{{file.image_url}}" alt="image">
<img *ngIf="msg.file.image_url" src="{{msg.file.image_url}}" alt="image">
<ion-icon *ngIf="msg.file.image_url == null" name="download-outline"></ion-icon>
</div>
<div *ngIf="msg.file.type != 'application/img'">