mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 12:51:42 +03:00
Merge pull request #915 from esteemapp/bugfix/reblog-option
Removed reblog option from reblogged posts
This commit is contained in:
commit
55e6306db7
@ -82,7 +82,7 @@ class PostCardContainer extends PureComponent {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { content, isHideImage, nsfw } = this.props;
|
||||
const { content, isHideImage, nsfw, isHideReblogOption } = this.props;
|
||||
const { _content } = this.state;
|
||||
|
||||
const isNsfwPost = nsfw === '1';
|
||||
@ -96,6 +96,7 @@ class PostCardContainer extends PureComponent {
|
||||
content={_content || content}
|
||||
isHideImage={isHideImage}
|
||||
isNsfwPost={isNsfwPost}
|
||||
isHideReblogOption={isHideReblogOption}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ class PostCardView extends Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { content, isHideImage, fetchPost, isNsfwPost } = this.props;
|
||||
const { content, isHideImage, fetchPost, isNsfwPost, isHideReblogOption } = this.props;
|
||||
|
||||
const _image = this._getPostImage(content, isNsfwPost);
|
||||
const reblogedBy = content.reblogged_by && content.reblogged_by[0];
|
||||
@ -88,7 +88,11 @@ class PostCardView extends Component {
|
||||
reblogedBy={reblogedBy}
|
||||
/>
|
||||
<View style={styles.dropdownWrapper}>
|
||||
<PostDropdown content={content} fetchPost={fetchPost} />
|
||||
<PostDropdown
|
||||
isHideReblogOption={isHideReblogOption}
|
||||
content={content}
|
||||
fetchPost={fetchPost}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
<View style={styles.postBodyWrapper}>
|
||||
|
@ -173,10 +173,10 @@ class PostDropdownContainer extends PureComponent {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { intl, currentAccount, content } = this.props;
|
||||
const { intl, currentAccount, content, isHideReblogOption } = this.props;
|
||||
let _OPTIONS = OPTIONS;
|
||||
|
||||
if (content && content.author === currentAccount.name) {
|
||||
if ((content && content.author === currentAccount.name) || isHideReblogOption) {
|
||||
_OPTIONS = OPTIONS.filter(item => item !== 'reblog');
|
||||
}
|
||||
|
||||
|
@ -228,6 +228,7 @@ class PostsView extends Component {
|
||||
isLoginDone,
|
||||
tag,
|
||||
isDarkTheme,
|
||||
isHideReblogOption,
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
@ -262,7 +263,12 @@ class PostsView extends Component {
|
||||
data={posts}
|
||||
showsVerticalScrollIndicator={false}
|
||||
renderItem={({ item }) => (
|
||||
<PostCard isRefresh={refreshing} content={item} isHideImage={isHideImage} />
|
||||
<PostCard
|
||||
isHideReblogOption={isHideReblogOption}
|
||||
isRefresh={refreshing}
|
||||
content={item}
|
||||
isHideImage={isHideImage}
|
||||
/>
|
||||
)}
|
||||
keyExtractor={(post, index) => index.toString()}
|
||||
onEndReached={() => this._loadPosts()}
|
||||
@ -275,13 +281,13 @@ class PostsView extends Component {
|
||||
onScrollBeginDrag={() => this._handleOnScrollStart()}
|
||||
refreshControl={
|
||||
<RefreshControl
|
||||
refreshing={refreshing}
|
||||
onRefresh={this._handleOnRefreshPosts}
|
||||
progressBackgroundColor="#357CE6"
|
||||
tintColor={!isDarkTheme ? '#357ce6' : '#96c0ff'}
|
||||
titleColor="#fff"
|
||||
colors={['#fff']}
|
||||
/>
|
||||
refreshing={refreshing}
|
||||
onRefresh={this._handleOnRefreshPosts}
|
||||
progressBackgroundColor="#357CE6"
|
||||
tintColor={!isDarkTheme ? '#357ce6' : '#96c0ff'}
|
||||
titleColor="#fff"
|
||||
colors={['#fff']}
|
||||
/>
|
||||
}
|
||||
ref={ref => {
|
||||
this.flatList = ref;
|
||||
|
@ -206,6 +206,7 @@ class ProfileScreen extends PureComponent {
|
||||
tag={username}
|
||||
key={username}
|
||||
handleOnScroll={this._handleOnScroll}
|
||||
isHideReblogOption
|
||||
/>
|
||||
</View>
|
||||
<View
|
||||
|
Loading…
Reference in New Issue
Block a user