pull from developer

This commit is contained in:
Eudes Inácio
2022-01-10 15:48:06 +01:00
73 changed files with 1061 additions and 600 deletions
@@ -261,7 +261,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
getMessageDB() {
this.storageservice.get('chatmsg').then((msg) => {
this.storage.get('chatmsg').then((msg) => {
console.log('FROM DB WEB', msg)
let msgArray = [];
msgArray = msg;
@@ -276,7 +276,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
let image;
if (typeof element.file != 'undefined') {
if (typeof element.file.guid != 'undefined') {
let imageguid = this.storageservice.get(element.file.guid);
let imageguid = this.storage.get(element.file.guid);
if (imageguid) {
image = imageguid;
console.log('IMAGE STORAGE', image)
@@ -315,10 +315,10 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
});
console.log('Web TRANSFORM MSG', mgsArray)
this.storageservice.remove('chatmsg').then(() => {
this.storage.remove('chatmsg').then(() => {
console.log('MSG REMOVE FROM STORAGE')
});
this.storageservice.store('chatmsg', mgsArray).then(() => {
this.storage.set('chatmsg', mgsArray).then(() => {
console.log('MSG SAVED ON STORAGE')
this.getMessageDB();
});
@@ -380,7 +380,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
console.log('GET FILE WEB', foo)
});
this.storageservice.get('chatmsg').then(async (msg) => {
this.storage.get('chatmsg').then(async (msg) => {
let msgArray = [];
msgArray = msg;
msgArray.filter(data => data._id != this.roomId);
@@ -411,8 +411,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
});
await this.storageservice.remove('chatmsg');
await this.storageservice.store('chatmsg', newmgsArray);
await this.storage.remove('chatmsg');
await this.storage.set('chatmsg', newmgsArray);
})
}
@@ -797,7 +797,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
console.log('TRY ARRAY BUFFER NAME', name);
console.log('TRY ARRAY BUFFER', this.downloadFile);
this.storageservice.store(msg.file.guid, this.downloadFile);
this.storage.set(msg.file.guid, this.downloadFile);
await Filesystem.writeFile({
path: `${IMAGE_DIR}/${name}`,