Chat bug solved and presidente text removed

This commit is contained in:
Eudes Inácio
2022-07-06 09:59:22 +01:00
parent e3927bcc19
commit c78e179303
11 changed files with 151 additions and 100 deletions
@@ -35,6 +35,7 @@ import { File } from '@awesome-cordova-plugins/file/ngx';
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
import { SessionStore } from 'src/app/store/session.service';
import { HttpErrorResponse } from '@angular/common/http';
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
/*
@@ -1115,8 +1116,23 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
str = str.substring(1, ((str.length) - 1));
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
this.downloadFileFromBrowser(msg.attachments[0].name, str)
} else if (this.platform.is('tablet')) {
console.log(msg)
if (msg.file.type == "application/img") {
const modal = await this.modalController.create({
component: ViewMediaPage,
cssClass: 'modal modal-desktop',
componentProps: {
image: msg.attachments[0].image_url,
type: msg.file.type,
username: msg.u.name,
_updatedAt: msg._updatedAt
}
});
modal.present();
} else {
this.downloadFileFromBrowser("file", str)
}
} else {
this.openFile(str, msg.attachments[0].name, msg.file.type);
}