mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-17 18:31:36 +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: {
|
content: {
|
||||||
backgroundColor: '$primaryGrayBackground',
|
backgroundColor: '$primaryGrayBackground',
|
||||||
},
|
},
|
||||||
|
mutedView: {
|
||||||
|
flex: 1,
|
||||||
|
backgroundColor: '$primaryLightBackground',
|
||||||
|
alignItems: 'center',
|
||||||
|
marginTop: 72,
|
||||||
|
},
|
||||||
cover: {
|
cover: {
|
||||||
width: '$deviceWidth',
|
width: '$deviceWidth',
|
||||||
height: 160,
|
height: 160,
|
||||||
|
@ -5,6 +5,7 @@ import get from 'lodash/get';
|
|||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
|
import EStyleSheet from 'react-native-extended-stylesheet';
|
||||||
import { CollapsibleCard } from '../collapsibleCard';
|
import { CollapsibleCard } from '../collapsibleCard';
|
||||||
import { Comments } from '../comments';
|
import { Comments } from '../comments';
|
||||||
import { Header } from '../header';
|
import { Header } from '../header';
|
||||||
@ -23,6 +24,7 @@ import styles from './profileStyles';
|
|||||||
|
|
||||||
import { TabbedPosts } from '../tabbedPosts';
|
import { TabbedPosts } from '../tabbedPosts';
|
||||||
import CommentsTabContent from './children/commentsTabContent';
|
import CommentsTabContent from './children/commentsTabContent';
|
||||||
|
import { Icon } from '..';
|
||||||
|
|
||||||
class ProfileView extends PureComponent {
|
class ProfileView extends PureComponent {
|
||||||
constructor(props) {
|
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 }) {
|
_isCloseToBottom({ layoutMeasurement, contentOffset, contentSize }) {
|
||||||
return layoutMeasurement.height + contentOffset.y >= contentSize.height - 20;
|
return layoutMeasurement.height + contentOffset.y >= contentSize.height - 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { handleOnBackPress, isOwnProfile, quickProfile, reverseHeader } = this.props;
|
const { handleOnBackPress, quickProfile, reverseHeader, isMuted } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
@ -265,7 +281,7 @@ class ProfileView extends PureComponent {
|
|||||||
/>
|
/>
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
{this._renderProfileContent()}
|
{this._renderProfileContent()}
|
||||||
{this._renderTabs()}
|
{!isMuted ? this._renderTabs() : this._renderMutedView()}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user