improve publications

This commit is contained in:
Peter Maquiran
2023-02-27 20:04:22 +01:00
parent d289f377b5
commit 368607e81c
3 changed files with 16 additions and 21 deletions
@@ -78,11 +78,10 @@ export class ViewPublicationsPage implements OnInit {
}
doRefresh =(event) => {
this.getPublicationsIds();
setTimeout(() => {
this.getPublicationDetail();
}, 3000);
this.getPublicationDetail();
this.getPublicationsIds();
}
close() {
@@ -90,9 +89,13 @@ export class ViewPublicationsPage implements OnInit {
}
getPublicationDetail() {
this.showLoader = true;
this.publications.GetPresidentialAction(this.folderId).subscribe(res=>{
this.showLoader = false;
this.item = res;
}, (error) => {
this.showLoader = false;
// this.httpErroHandle.httpStatusHandle(error)
});
}
@@ -100,21 +103,11 @@ export class ViewPublicationsPage implements OnInit {
this.showLoader = true;
const folderId = this.folderId
//this.getFromDB()
this.publications.GetPublicationsImages(this.folderId).subscribe(res => {
this.publicationList = new Array();
/* for(let i = 0; i < res.length; i++) {
this.publications.GetPublicationById(res[i]).subscribe(ress => {
let item: Publication = this.publicationPipe.itemList(ress)
this.publicationList.push(item);
})
} */
res.forEach(element => {
this.publications.GetPublicationById(element).subscribe(ress => {
@@ -133,6 +126,7 @@ export class ViewPublicationsPage implements OnInit {
this.getpublication = this.publicationList;
this.showLoader = false;
},() => {
this.showLoader = false;
this.getFromDB();
});
}