mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
offline messagens
This commit is contained in:
@@ -23,6 +23,7 @@ export class MessageService {
|
||||
file
|
||||
attachments
|
||||
offline = true
|
||||
displayType = ''
|
||||
|
||||
constructor(private storage: Storage) {
|
||||
}
|
||||
@@ -49,14 +50,16 @@ export class MessageService {
|
||||
|
||||
|
||||
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
|
||||
});
|
||||
this.getFileFromDb()
|
||||
if(this.file.type) {
|
||||
if(this.file.type != 'application/webtrix' && typeof(this.file.type) == 'string') {
|
||||
this.displayType = this.file.type.replace('application/','').toUpperCase()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
delete() {}
|
||||
@@ -75,4 +78,18 @@ export class MessageService {
|
||||
return firstName + ' ' + lastName
|
||||
}
|
||||
|
||||
|
||||
getFileFromDb() {
|
||||
if (this.file) {
|
||||
if (this.file.guid) {
|
||||
this.storage.get(this.file.guid).then((image) => {
|
||||
if(image != null) {
|
||||
this.file.image_url = image
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user