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
@@ -3,7 +3,7 @@
<div class="title">
<div class="thetitle"><ion-label >Pedidos</ion-label></div>
<div class="theicon">
<button title="Atualizar" class="btn-no-color" (click)="doRefresh()">
<button title="Atualizar" class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
@@ -20,7 +20,7 @@
</ion-toolbar>
</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"
@@ -59,7 +59,7 @@ export class PedidosPage implements OnInit {
) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.doRefresh()
this.LoadList()
} else {
this.LoadList()
}
@@ -121,7 +121,12 @@ export class PedidosPage implements OnInit {
this.skeletonLoader = false
}
doRefresh() {
doRefresh(event) {
if (event) {
setTimeout(() => {
event.target.complete();
}, 2000);
}
setTimeout(() => {
this.LoadList();
}, 1000);