remove sqlite and unused import

This commit is contained in:
Peter Maquiran
2023-06-11 13:36:27 +01:00
parent f7b54a04ba
commit acb79bb62e
26 changed files with 438 additions and 1256 deletions
@@ -142,7 +142,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.setStatus('online');
this.getChatMembers();
this.getRoomMessageDB(this.roomId);
// this.getRoomMessageDB(this.roomId);
this.getGroupContacts({});
}
@@ -891,38 +891,38 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
*/
getRoomMessageDB(roomId) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
this.sqlservice.getAllChatMSG(roomId).then((msg: any) => {
// getRoomMessageDB(roomId) {
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
// } else {
// this.sqlservice.getAllChatMSG(roomId).then((msg: any) => {
let chatmsgArray = [];
let array = []
msg.forEach(element => {
// let chatmsgArray = [];
// let array = []
// msg.forEach(element => {
let msgChat = {
_id: element.Id,
attachments: this.isJson(element.Attachments),
channels: this.isJson(element.Channels),
file: this.isJson(element.File),
mentions: this.isJson(element.Mentions),
msg: element.Msg,
rid: element.Rid,
ts: element.Ts,
u: this.isJson(element.U),
_updatedAt: element.UpdatedAt,
image_url: this.isJson(element.image_url)
}
// let msgChat = {
// _id: element.Id,
// attachments: this.isJson(element.Attachments),
// channels: this.isJson(element.Channels),
// file: this.isJson(element.File),
// mentions: this.isJson(element.Mentions),
// msg: element.Msg,
// rid: element.Rid,
// ts: element.Ts,
// u: this.isJson(element.U),
// _updatedAt: element.UpdatedAt,
// image_url: this.isJson(element.image_url)
// }
chatmsgArray.push(msgChat)
});
// chatmsgArray.push(msgChat)
// });
// this.messages = chatmsgArray;
// // this.messages = chatmsgArray;
})
}
}
// })
// }
// }
isJson(str) {
try {
@@ -956,7 +956,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
}, */
}
this.sqlservice.addChatMSG(chatmsg)
// this.sqlservice.addChatMSG(chatmsg)
});
}
@@ -979,7 +979,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
//this.messages = msgOnly.reverse();
//
this.transformDataMSG(msgOnly.reverse());
this.getRoomMessageDB(this.roomId);
// this.getRoomMessageDB(this.roomId);
// Reconnect in one second
if (this.route.url != "/home/chat") {