fix slow publication

This commit is contained in:
Peter Maquiran
2023-02-27 21:24:34 +01:00
parent 9a1976f543
commit 7e5039b4fa
6 changed files with 147 additions and 216 deletions
@@ -79,6 +79,7 @@ export class PublicationsPage implements OnInit {
ngOnInit() {
const pathname = window.location.pathname
this.getActions();
this.router.events.forEach((event) => {
if (event instanceof NavigationEnd && event.url == pathname) {
@@ -140,10 +141,10 @@ export class PublicationsPage implements OnInit {
getActions() {
this.showLoader = false
this.showLoader = true
this.publications.GetPublicationFolderList().subscribe(async res => {
this.showLoader = true;
this.showLoader = false;
const folders: PublicationFolder[] = this.getPublicationFolderMap(res)
this.publicationsEventFolderList = folders.filter((e)=>e.ActionType == 'Evento')
@@ -166,13 +167,13 @@ export class PublicationsPage implements OnInit {
}
addActionToStorage(events, viagens) {
// addActionToStorage(events, viagens) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
this.storage.set('actionsEvents', events);
this.storage.set('actionsViagens', viagens);
}
}
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
// this.storage.set('actionsEvents', events);
// this.storage.set('actionsViagens', viagens);
// }
// }
addActionToDB(folder) {