mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-17 02:13:34 +03:00
Merge pull request #2079 from ecency/nt/profile-mute-hide
hiding profile content if user is muted
This commit is contained in:
commit
76b3c5c56f
@ -8,6 +8,12 @@ export default EStyleSheet.create({
|
||||
content: {
|
||||
backgroundColor: '$primaryGrayBackground',
|
||||
},
|
||||
mutedView: {
|
||||
flex: 1,
|
||||
backgroundColor: '$primaryLightBackground',
|
||||
alignItems: 'center',
|
||||
marginTop: 72,
|
||||
},
|
||||
cover: {
|
||||
width: '$deviceWidth',
|
||||
height: 160,
|
||||
|
@ -5,6 +5,7 @@ import get from 'lodash/get';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
// Components
|
||||
import EStyleSheet from 'react-native-extended-stylesheet';
|
||||
import { CollapsibleCard } from '../collapsibleCard';
|
||||
import { Comments } from '../comments';
|
||||
import { Header } from '../header';
|
||||
@ -23,6 +24,7 @@ import styles from './profileStyles';
|
||||
|
||||
import { TabbedPosts } from '../tabbedPosts';
|
||||
import CommentsTabContent from './children/commentsTabContent';
|
||||
import { Icon } from '..';
|
||||
|
||||
class ProfileView extends PureComponent {
|
||||
constructor(props) {
|
||||
@ -248,12 +250,26 @@ class ProfileView extends PureComponent {
|
||||
);
|
||||
};
|
||||
|
||||
_renderMutedView = () => {
|
||||
return (
|
||||
<View style={styles.mutedView}>
|
||||
<Icon
|
||||
iconType="MaterialCommunityIcons"
|
||||
name="volume-variant-off"
|
||||
size={120}
|
||||
color={EStyleSheet.value('$iconColor')}
|
||||
disabled={true}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
_isCloseToBottom({ layoutMeasurement, contentOffset, contentSize }) {
|
||||
return layoutMeasurement.height + contentOffset.y >= contentSize.height - 20;
|
||||
}
|
||||
|
||||
render() {
|
||||
const { handleOnBackPress, isOwnProfile, quickProfile, reverseHeader } = this.props;
|
||||
const { handleOnBackPress, quickProfile, reverseHeader, isMuted } = this.props;
|
||||
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
@ -265,7 +281,7 @@ class ProfileView extends PureComponent {
|
||||
/>
|
||||
<View style={styles.container}>
|
||||
{this._renderProfileContent()}
|
||||
{this._renderTabs()}
|
||||
{!isMuted ? this._renderTabs() : this._renderMutedView()}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user