Fixed comment requirements

This commit is contained in:
Mustafa Buyukcelebi 2019-06-21 11:28:55 +03:00
parent e44f78ed74
commit 7e9685a104
5 changed files with 16 additions and 16 deletions

View File

@ -82,7 +82,7 @@ class PostCardContainer extends PureComponent {
}; };
render() { render() {
const { content, isHideImage, nsfw, hideReblogOption } = this.props; const { content, isHideImage, nsfw, isHideReblogOption } = this.props;
const { _content } = this.state; const { _content } = this.state;
const isNsfwPost = nsfw === '1'; const isNsfwPost = nsfw === '1';
@ -96,7 +96,7 @@ class PostCardContainer extends PureComponent {
content={_content || content} content={_content || content}
isHideImage={isHideImage} isHideImage={isHideImage}
isNsfwPost={isNsfwPost} isNsfwPost={isNsfwPost}
hideReblogOption={hideReblogOption} isHideReblogOption={isHideReblogOption}
/> />
); );
} }

View File

@ -68,7 +68,7 @@ class PostCardView extends Component {
}; };
render() { render() {
const { content, isHideImage, fetchPost, isNsfwPost, hideReblogOption } = this.props; const { content, isHideImage, fetchPost, isNsfwPost, isHideReblogOption } = this.props;
const _image = this._getPostImage(content, isNsfwPost); const _image = this._getPostImage(content, isNsfwPost);
const reblogedBy = content.reblogged_by && content.reblogged_by[0]; const reblogedBy = content.reblogged_by && content.reblogged_by[0];
@ -89,7 +89,7 @@ class PostCardView extends Component {
/> />
<View style={styles.dropdownWrapper}> <View style={styles.dropdownWrapper}>
<PostDropdown <PostDropdown
hideReblogOption={hideReblogOption} isHideReblogOption={isHideReblogOption}
content={content} content={content}
fetchPost={fetchPost} fetchPost={fetchPost}
/> />

View File

@ -173,10 +173,10 @@ class PostDropdownContainer extends PureComponent {
}; };
render() { render() {
const { intl, currentAccount, content, hideReblogOption } = this.props; const { intl, currentAccount, content, isHideReblogOption } = this.props;
let _OPTIONS = OPTIONS; let _OPTIONS = OPTIONS;
if ((content && content.author === currentAccount.name) || hideReblogOption) { if ((content && content.author === currentAccount.name) || isHideReblogOption) {
_OPTIONS = OPTIONS.filter(item => item !== 'reblog'); _OPTIONS = OPTIONS.filter(item => item !== 'reblog');
} }

View File

@ -228,7 +228,7 @@ class PostsView extends Component {
isLoginDone, isLoginDone,
tag, tag,
isDarkTheme, isDarkTheme,
hideReblogOption, isHideReblogOption,
} = this.props; } = this.props;
return ( return (
@ -264,7 +264,7 @@ class PostsView extends Component {
showsVerticalScrollIndicator={false} showsVerticalScrollIndicator={false}
renderItem={({ item }) => ( renderItem={({ item }) => (
<PostCard <PostCard
hideReblogOption={hideReblogOption} isHideReblogOption={isHideReblogOption}
isRefresh={refreshing} isRefresh={refreshing}
content={item} content={item}
isHideImage={isHideImage} isHideImage={isHideImage}
@ -281,13 +281,13 @@ class PostsView extends Component {
onScrollBeginDrag={() => this._handleOnScrollStart()} onScrollBeginDrag={() => this._handleOnScrollStart()}
refreshControl={ refreshControl={
<RefreshControl <RefreshControl
refreshing={refreshing} refreshing={refreshing}
onRefresh={this._handleOnRefreshPosts} onRefresh={this._handleOnRefreshPosts}
progressBackgroundColor="#357CE6" progressBackgroundColor="#357CE6"
tintColor={!isDarkTheme ? '#357ce6' : '#96c0ff'} tintColor={!isDarkTheme ? '#357ce6' : '#96c0ff'}
titleColor="#fff" titleColor="#fff"
colors={['#fff']} colors={['#fff']}
/> />
} }
ref={ref => { ref={ref => {
this.flatList = ref; this.flatList = ref;

View File

@ -206,7 +206,7 @@ class ProfileScreen extends PureComponent {
tag={username} tag={username}
key={username} key={username}
handleOnScroll={this._handleOnScroll} handleOnScroll={this._handleOnScroll}
hideReblogOption isHideReblogOption
/> />
</View> </View>
<View <View