This commit is contained in:
tiago.kayaya
2022-02-16 15:49:24 +01:00
3 changed files with 19 additions and 15 deletions
@@ -140,22 +140,21 @@ export class ViewPublicationsPage implements OnInit {
this.showLoader = true;
const folderId = this.folderId
this.getFromDB()
this.publications.GetPublicationsImages(this.folderId).subscribe(res => {
console.log('publications ids', res)
this.publicationList = new Array();
for(let i = 0; i < res.length; i++) {
/* for(let i = 0; i < res.length; i++) {
this.publications.GetPublicationById(res[i]).subscribe(ress => {
console.log('publications by ids', ress)
let item: Publication = this.publicationPipe.itemList(ress)
console.log('publications by ids 2', item)
this.publicationList.push(item);
})
}
} */
/* res.forEach(element => {
res.forEach(element => {
console.log('publications elements', element)
this.publications.GetPublicationById(element).subscribe(ress => {
console.log('publications by ids', ress)
@@ -164,7 +163,7 @@ export class ViewPublicationsPage implements OnInit {
this.publicationList.push(item);
})
}); */
});
console.log('PUBLICATIONS IMAGEs',this.publicationList)
this.sqliteservice.updateactions(this.folderId, JSON.stringify(this.publicationList));
console.log('PUBLICATIONS IMAGEs',this.publicationList)
@@ -184,6 +183,8 @@ export class ViewPublicationsPage implements OnInit {
this.publicationListStorage.add(folderId, this.publicationList)
this.getpublication = this.publicationList; */
}, (error) => {
this.getFromDB()
});
}