fix loader

This commit is contained in:
Peter Maquiran
2023-02-02 10:37:17 +01:00
parent ac23c085fb
commit 0036ce6ab2
29 changed files with 125 additions and 61 deletions
@@ -11,7 +11,7 @@
</ion-header>
<ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content
pullingIcon="chevron-down-circle-outline"
pullingText="deslize para actualizar"
@@ -26,7 +26,7 @@ export class DespachosPage implements OnInit {
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && event.url.startsWith('/home/gabinete-digital?despachos=true')) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.doRefresh()
this.LoadList()
} else {
this.LoadList()
}
@@ -45,8 +45,14 @@ export class DespachosPage implements OnInit {
await this.despachoRule.getList({updateStore: true})
this.skeletonLoader = false;
}
doRefresh(event) {
if (event) {
setTimeout(() => {
event.target.complete();
}, 2000);
}
doRefresh() {
setTimeout(() => {
this.LoadList();
}, 1000);