can run on device

This commit is contained in:
Peter Maquiran
2022-07-12 14:57:02 +01:00
parent 8fc8726cfa
commit 762329bb49
4 changed files with 674 additions and 32294 deletions
@@ -1093,7 +1093,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
async openPreview(msg: MessageService) {
if(msg.file.type === "application/webtrix") {
if(msg?.file?.type === "application/webtrix") {
this.viewDocument(msg.file, msg.attachments.image_url)
} else {
if (!msg.attachments[0].image_url || msg.attachments[0].image_url === null || msg.attachments[0].image_url === '') {
@@ -1106,7 +1106,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
if (msg.file.type == "application/img") {
if (msg?.file?.type == "application/img") {
const modal = await this.modalController.create({
component: ViewMediaPage,
cssClass: 'modal modal-desktop',