mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
pull from developer
This commit is contained in:
@@ -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}`,
|
||||
|
||||
Reference in New Issue
Block a user