fixed bug in mobile view

This commit is contained in:
tiago.kayaya
2021-12-14 17:09:53 +01:00
parent 4b5d3c87aa
commit 243cbe5cf9
+8 -5
View File
@@ -110,7 +110,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.load();
this.setStatus('online');
this.loadFiles();
//this.loadFiles();
VoiceRecorder.requestAudioRecordingPermission();
Filesystem.mkdir({
path: IMAGE_DIR,
@@ -562,7 +562,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
let msgChat = {
_id: element.Id,
attachments: this.isJson(element.Attachments),
attachments: this.isJson(element.Attachments),
channels: this.isJson(element.Channels),
file: this.isJson(element.File),
mentions: this.isJson(element.Mentions),
@@ -613,7 +613,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.sqlservice.addChatMSG(chatmsg)
});
}
}
async serverLongPull() {
@@ -643,8 +643,11 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
// Show Error
//showMessage(response.statusText);
//this.loadMessages()
//this.messages = res['messages'].reverse();
//this.chatMessageStore.add(roomId, this.messages)
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
this.messages = res['messages'].reverse();
this.chatMessageStore.add(roomId, this.messages)
}
//console.log(this.messages);
// Reconnect in one second