mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-28 01:52:56 +03:00
created apple request
This commit is contained in:
parent
1b8d3bdb9f
commit
eccee09f6b
@ -55,6 +55,7 @@ class PostsContainer extends Component {
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
currentAccount: state.account.currentAccount,
|
||||
isLoggedIn: state.application.isLoggedIn,
|
||||
isLoginDone: state.application.isLoginDone,
|
||||
isCollapsePostButtonOpen: state.ui.isCollapsePostButton,
|
||||
});
|
||||
|
@ -25,6 +25,7 @@ class PostsView extends Component {
|
||||
isLoading: false,
|
||||
isPostsLoading: false,
|
||||
isHideImage: false,
|
||||
selectedFilterIndex: 0,
|
||||
};
|
||||
}
|
||||
|
||||
@ -111,7 +112,10 @@ class PostsView extends Component {
|
||||
};
|
||||
|
||||
_handleOnDropdownSelect = (index) => {
|
||||
this.setState({ isPostsLoading: true });
|
||||
this.setState({
|
||||
isPostsLoading: true,
|
||||
selectedFilterIndex: index,
|
||||
});
|
||||
this._loadPosts(filters[index]);
|
||||
};
|
||||
|
||||
@ -128,9 +132,11 @@ class PostsView extends Component {
|
||||
|
||||
render() {
|
||||
const {
|
||||
refreshing, posts, isPostsLoading, isHideImage,
|
||||
refreshing, posts, isPostsLoading, isHideImage, selectedFilterIndex,
|
||||
} = this.state;
|
||||
const { filterOptions, intl } = this.props;
|
||||
const {
|
||||
filterOptions, intl, isLoggedIn, getFor, isLoginDone,
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
@ -146,6 +152,18 @@ class PostsView extends Component {
|
||||
onRightIconPress={this._onRightIconPress}
|
||||
/>
|
||||
)}
|
||||
<Fragment>
|
||||
{filters[selectedFilterIndex] === 'feed'
|
||||
&& getFor === 'feed'
|
||||
&& !isLoggedIn
|
||||
&& isLoginDone && (
|
||||
<NoPost
|
||||
defaultText={intl.formatMessage({
|
||||
id: 'profile.login_to_see',
|
||||
})}
|
||||
/>
|
||||
)}
|
||||
</Fragment>
|
||||
{posts && posts.length > 0 && !isPostsLoading ? (
|
||||
<FlatList
|
||||
data={posts}
|
||||
|
@ -34,9 +34,11 @@ class HomeScreen extends PureComponent {
|
||||
'PAYOUT',
|
||||
];
|
||||
let tag;
|
||||
let initialPage;
|
||||
|
||||
if (isLoginDone && !isLoggedIn) {
|
||||
tag = 'esteemapp';
|
||||
// tag = 'esteemapp';
|
||||
initialPage = 1;
|
||||
}
|
||||
|
||||
return (
|
||||
@ -46,6 +48,7 @@ class HomeScreen extends PureComponent {
|
||||
<View style={styles.container}>
|
||||
<ScrollableTabView
|
||||
style={styles.tabView}
|
||||
initialPage={isLoginDone && !isLoggedIn ? 1 : 0}
|
||||
renderTabBar={() => (
|
||||
<TabBar
|
||||
style={styles.tabbar}
|
||||
|
Loading…
Reference in New Issue
Block a user