reset message

This commit is contained in:
Peter Maquiran
2022-01-28 16:37:18 +01:00
parent 666a51e710
commit a7febddb34
+7 -2
View File
@@ -48,7 +48,7 @@ export class RoomService {
private platform: Platform,
private sqlservice: SqliteService,
private NativeNotificationService: NativeNotificationService,
) {
) {
this.NativeNotificationService.askForPermission()
}
@@ -281,12 +281,17 @@ export class RoomService {
if (this.hasLoadHistory) { return false }
this.storage.get('chatmsg' + this.id).then((messages = [])=>{
let localMessages = []
messages.forEach(message => {
message = this.fix_updatedAt(message)
const wewMessage = new MessageService(this.storage)
wewMessage.setData(message)
this.messages.push(wewMessage)
localMessages.push(wewMessage)
});
this.messages = localMessages
})
this.WsChatService.loadHistory(this.id, limit).then((chatHistory:chatHistory) => {