diff --git a/components/BaseContainer.js b/components/BaseContainer.js index 01f37c4..65ad3c3 100644 --- a/components/BaseContainer.js +++ b/components/BaseContainer.js @@ -24,6 +24,8 @@ type State = { export default class BaseContainer extends React.Component { + willBlurSubscription: function; + static defaultProps = { headerRightButton: }; @@ -43,6 +45,26 @@ export default class BaseContainer extends React.Component { this.setState({isOpen}); } + /** + * Register for blur event to close side menu on screen change + */ + componentDidMount() { + this.willBlurSubscription = this.props.navigation.addListener( + 'willBlur', + payload => { + this.setState({isOpen: false}); + } + ); + } + + /** + * Unregister from event when un-mounting components + */ + componentWillUnmount() { + if (this.willBlurSubscription !== undefined) + this.willBlurSubscription.remove(); + } + render() { return ( { let canRefresh; if (this.lastRefresh !== undefined) - canRefresh = (new Date().getTime() - this.lastRefresh.getTime())/1000 > this.minTimeBetweenRefresh; + canRefresh = (new Date().getTime() - this.lastRefresh.getTime()) / 1000 > this.minTimeBetweenRefresh; else canRefresh = true; @@ -314,9 +314,10 @@ export default class FetchedDataSectionList extends React.Component - {dataset[i].title} } diff --git a/native-base-theme/variables/platform.js b/native-base-theme/variables/platform.js index 5f83cf7..20bb3f9 100644 --- a/native-base-theme/variables/platform.js +++ b/native-base-theme/variables/platform.js @@ -238,6 +238,7 @@ export default { // Tabs tabBgColor: "#F8F8F8", + tabIconColor: platform === "ios" ? "#5d5d5d" : "#fff", tabFontSize: 15, // Text diff --git a/native-base-theme/variables/platformDark.js b/native-base-theme/variables/platformDark.js index 6abea3a..0914bd2 100644 --- a/native-base-theme/variables/platformDark.js +++ b/native-base-theme/variables/platformDark.js @@ -239,6 +239,7 @@ export default { // Tabs tabBgColor: "#2b2b2b", + tabIconColor: "#fff", tabFontSize: 15, // Text diff --git a/screens/ProxiwashAboutScreen.js b/screens/ProxiwashAboutScreen.js index 3ab2ead..0f771b9 100644 --- a/screens/ProxiwashAboutScreen.js +++ b/screens/ProxiwashAboutScreen.js @@ -36,7 +36,7 @@ export default class ProxiwashAboutScreen extends React.Component { {i18n.t('proxiwashScreen.informationTab')} @@ -106,7 +106,7 @@ export default class ProxiwashAboutScreen extends React.Component { {i18n.t('proxiwashScreen.paymentTab')}