vbea 2 ani în urmă
părinte
comite
678f858938
1 a modificat fișierele cu 6 adăugiri și 4 ștergeri
  1. 6 4
      Strides-APP/app/pages/wallet/Overview.js

+ 6 - 4
Strides-APP/app/pages/wallet/Overview.js

@@ -34,8 +34,10 @@ export default class Overview extends Component {
   componentDidMount() {
     console.log("概述", this.props);
     Dialog.showProgressDialog();
-    if (!this.props.skeleton)
+    if (!this.props.skeleton) {
+      this.refreshing = true;
       this.getOverview();
+    }
   }
 
   componentDidUpdate() {
@@ -43,7 +45,7 @@ export default class Overview extends Component {
       if (this.props.refresh && !this.refreshing) {
         this.refreshing = true;
         this.getOverview();
-      } else if (this.state.skeleton) {
+      } else if (this.state.skeleton && !this.refreshing) {
         this.refreshing = true;
         this.getOverview();
       } else if (!this.state.chartReady) {
@@ -51,7 +53,7 @@ export default class Overview extends Component {
           this.setState({
             chartReady: true
           })
-        }, 100);
+        }, 500);
       }
     } else if (this.state.chartReady) {
       this.setState({
@@ -129,7 +131,7 @@ export default class Overview extends Component {
     this.refreshing = false;
     setTimeout(() => {
       Dialog.dismissLoading();
-    }, 2000);
+    }, 300);
   }
 
   barTheme = (active) => ({