mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-30 00:52:42 +03:00
Merge branch 'development' of github.com:esteemapp/esteem-mobile into bugfix/upvote-nan-value
This commit is contained in:
commit
373c56b522
@ -18,12 +18,7 @@ import styles from './bottomTabBarStyles';
|
||||
const _jumpTo = (route, index, routes, jumpTo) => {
|
||||
const _routeName = routes[index].routeName;
|
||||
|
||||
if (
|
||||
!!route &&
|
||||
!!get(route, 'params') &&
|
||||
!!get(route, 'params.scrollToTop') &&
|
||||
_routeName === ROUTES.TABBAR.HOME
|
||||
) {
|
||||
if (!!get(route, 'params.scrollToTop') && _routeName === ROUTES.TABBAR.HOME) {
|
||||
route.params.scrollToTop();
|
||||
}
|
||||
|
||||
@ -68,7 +63,7 @@ const BottomTabBarView = ({
|
||||
tintColor: activeTintColor,
|
||||
})}
|
||||
key={route}
|
||||
disabled={route.routeName === ROUTES.TABBAR.POSTBUTTON}
|
||||
disabled={route.routeName === ROUTES.TABBAR.POST_BUTTON}
|
||||
/>
|
||||
))}
|
||||
</TabBar>
|
||||
|
@ -91,10 +91,10 @@ export default class TabBar extends Component {
|
||||
const { selectedIndex, showIcon, pathX, circleRadius } = this.state;
|
||||
|
||||
return (
|
||||
<View style={[styles.container, style]}>
|
||||
<View style={style}>
|
||||
<View style={styles.subContent}>
|
||||
{children.map((route, i) => {
|
||||
let element = React.cloneElement(route, {
|
||||
const element = React.cloneElement(route, {
|
||||
selected: selectedIndex === i,
|
||||
onPress: this._onPress,
|
||||
key: i,
|
||||
|
@ -6,7 +6,7 @@ const FormattedCurrency = ({ value, fixAt = 3, currency }) => {
|
||||
const valueInCurrency = value * currencyRate;
|
||||
const toFixedValue = valueInCurrency.toFixed(fixAt);
|
||||
|
||||
return <Fragment key="result-val">{`${currencySymbol} ${toFixedValue}`}</Fragment>;
|
||||
return <Fragment key={toFixedValue.toString()}>{`${currencySymbol} ${toFixedValue}`}</Fragment>;
|
||||
};
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
|
@ -119,11 +119,12 @@ export default EStyleSheet.create({
|
||||
},
|
||||
scrollContainer: {
|
||||
flex: 1,
|
||||
backgroundColor: '$pureWhite',
|
||||
},
|
||||
popoverDetails: {
|
||||
flexDirection: 'row',
|
||||
height: 130,
|
||||
width: '$deviceWidth /2',
|
||||
width: '$deviceWidth / 2',
|
||||
borderRadius: 20,
|
||||
paddingHorizontal: 26,
|
||||
backgroundColor: '$primaryBackgroundColor',
|
||||
|
@ -51,7 +51,9 @@ class PostsView extends Component {
|
||||
const { isConnected, pageType } = this.props;
|
||||
|
||||
if (isConnected) {
|
||||
if (pageType !== 'profiles') await this._getPromotePosts();
|
||||
if (pageType !== 'profiles') {
|
||||
await this._getPromotePosts();
|
||||
}
|
||||
this._loadPosts();
|
||||
} else {
|
||||
this.setState({
|
||||
@ -110,7 +112,9 @@ class PostsView extends Component {
|
||||
};
|
||||
|
||||
_scrollToTop = () => {
|
||||
if (this.flatList) this.flatList.scrollToOffset({ x: 0, y: 0, animated: true });
|
||||
if (this.flatList) {
|
||||
this.flatList.scrollToOffset({ x: 0, y: 0, animated: true });
|
||||
}
|
||||
};
|
||||
|
||||
_loadPosts = async () => {
|
||||
@ -263,7 +267,9 @@ class PostsView extends Component {
|
||||
refreshing: true,
|
||||
},
|
||||
async () => {
|
||||
if (pageType !== 'profiles') await this._getPromotePosts();
|
||||
if (pageType !== 'profiles') {
|
||||
await this._getPromotePosts();
|
||||
}
|
||||
|
||||
this._loadPosts();
|
||||
},
|
||||
@ -344,7 +350,9 @@ class PostsView extends Component {
|
||||
const { handleOnScroll } = this.props;
|
||||
const currentOffset = event.nativeEvent.contentOffset.y;
|
||||
|
||||
if (handleOnScroll) handleOnScroll();
|
||||
if (handleOnScroll) {
|
||||
handleOnScroll();
|
||||
}
|
||||
this.setState({ scrollOffsetY: currentOffset });
|
||||
this.setState({ isShowFilterBar: scrollOffsetY > currentOffset || scrollOffsetY <= 0 });
|
||||
};
|
||||
|
@ -231,7 +231,6 @@ class UpvoteView extends Component {
|
||||
{({ openPopover, closePopover, popoverVisible, setPopoverAnchor, popoverAnchorRect }) => (
|
||||
<Fragment>
|
||||
<TouchableOpacity
|
||||
start
|
||||
ref={setPopoverAnchor}
|
||||
onPress={openPopover}
|
||||
style={styles.upvoteButton}
|
||||
|
@ -32,7 +32,7 @@ export default {
|
||||
HOME: `Home${TABBAR_SUFFIX}`,
|
||||
NOTIFICATION: `Notification${TABBAR_SUFFIX}`,
|
||||
POINTS: `Points${TABBAR_SUFFIX}`,
|
||||
POSTBUTTON: `PostButton${TABBAR_SUFFIX}`,
|
||||
POST_BUTTON: `PostButton${TABBAR_SUFFIX}`,
|
||||
PROFILE: `Profile${TABBAR_SUFFIX}`,
|
||||
},
|
||||
MODAL: {
|
||||
|
@ -34,7 +34,7 @@ const BaseNavigator = createBottomTabNavigator(
|
||||
),
|
||||
}),
|
||||
},
|
||||
[ROUTES.TABBAR.POSTBUTTON]: {
|
||||
[ROUTES.TABBAR.POST_BUTTON]: {
|
||||
screen: () => null,
|
||||
navigationOptions: {
|
||||
tabBarIcon: ({ tintColor }) => <PostButton />,
|
||||
|
@ -46,6 +46,7 @@ const BoostScreen = () => {
|
||||
) : (
|
||||
productList.map(product => (
|
||||
<ProductItemLine
|
||||
key={get(product, 'title')}
|
||||
isLoading={isLoading}
|
||||
disabled={isProcessing}
|
||||
product={product}
|
||||
|
Loading…
Reference in New Issue
Block a user