mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
remove sqlite and unused import
This commit is contained in:
@@ -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") {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user