mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Bug msg repeated
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Message } from 'src/app/models/chatMethod';
|
||||
import { chatHistory, ChatMessage, File } from 'src/app/models/chatMethod'
|
||||
import { Storage } from '@ionic/storage';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -20,7 +21,8 @@ export class MessageService {
|
||||
file
|
||||
attachments
|
||||
|
||||
constructor() { }
|
||||
constructor(private storage: Storage) {
|
||||
}
|
||||
|
||||
setData({customFields, channels, mentions, msg ,rid ,ts, u, t, _id, _updatedAt, file, attachments}:Message) {
|
||||
this.customFields = customFields
|
||||
@@ -35,6 +37,16 @@ export class MessageService {
|
||||
this._updatedAt = _updatedAt
|
||||
this.file = file
|
||||
this.attachments = attachments
|
||||
|
||||
|
||||
if (this.file) {
|
||||
if (this.file.guid) {
|
||||
this.storage.get(this.file.guid).then((image) => {
|
||||
console.log('IMAGE FROM STORAGE', image)
|
||||
this.file.image_url = image
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
delete() {}
|
||||
|
||||
Reference in New Issue
Block a user