From 39c97d4bc4f7abd7738172a6b70c4a5fcc031ced Mon Sep 17 00:00:00 2001 From: Mustafa Buyukcelebi Date: Thu, 24 Jan 2019 17:30:27 +0300 Subject: [PATCH] Fixed estimated value issue --- src/screens/profile/screen/profileScreen.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/screens/profile/screen/profileScreen.js b/src/screens/profile/screen/profileScreen.js index 137b58fe6..a4d3c0e17 100644 --- a/src/screens/profile/screen/profileScreen.js +++ b/src/screens/profile/screen/profileScreen.js @@ -33,6 +33,7 @@ class ProfileScreen extends PureComponent { isSummaryOpen: true, collapsibleMoreHeight: 0, estimatedWalletValue: 0, + oldEstimatedWalletValue: 0, }; } @@ -81,7 +82,9 @@ class ProfileScreen extends PureComponent { getReplies, } = this.props; - const { isSummaryOpen, collapsibleMoreHeight, estimatedWalletValue } = this.state; + const { + isSummaryOpen, collapsibleMoreHeight, estimatedWalletValue, oldEstimatedWalletValue, + } = this.state; let _about; let coverImage; @@ -163,6 +166,14 @@ class ProfileScreen extends PureComponent { renderTabBar={() => ( )} + onChangeTab={({ i }) => { + if (i !== 2) { + this.setState({ + estimatedWalletValue: 0, + oldEstimatedWalletValue: estimatedWalletValue, + }); + } else this.setState({ estimatedWalletValue: oldEstimatedWalletValue }); + }} >