mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-21 04:11:50 +03:00
Merge pull request #1173 from esteemapp/bugfix/profile-summary
Fixed percent bar and cover image issues
This commit is contained in:
commit
bec5c01fc0
@ -103,7 +103,15 @@ class ProfileSummaryView extends PureComponent {
|
||||
const isColumn = rowLength && DEVICE_WIDTH / rowLength <= 7.3;
|
||||
|
||||
const followButtonIcon = !isFollowing ? 'account-plus' : 'account-minus';
|
||||
const coverImageUrl = getResizedImage(get(about, 'cover_image'), 400);
|
||||
let coverImageUrl = getResizedImage(get(about, 'cover_image'), 400);
|
||||
|
||||
if (!coverImageUrl) {
|
||||
coverImageUrl = isDarkTheme
|
||||
? require('../../../assets/dark_cover_image.png')
|
||||
: require('../../../assets/default_cover_image.png');
|
||||
} else {
|
||||
coverImageUrl = { uri: coverImageUrl };
|
||||
}
|
||||
|
||||
dropdownOptions.push(!isMuted ? 'MUTE' : 'UNMUTE');
|
||||
|
||||
@ -126,7 +134,7 @@ class ProfileSummaryView extends PureComponent {
|
||||
</View>
|
||||
<Image
|
||||
style={styles.longImage}
|
||||
source={{ uri: coverImageUrl }}
|
||||
source={coverImageUrl}
|
||||
defaultSource={isDarkTheme ? DARK_COVER_IMAGE : LIGHT_COVER_IMAGE}
|
||||
/>
|
||||
<TouchableOpacity
|
||||
|
@ -330,7 +330,6 @@ class ProfileContainer extends Component {
|
||||
quickProfile,
|
||||
user,
|
||||
username,
|
||||
selectedUser,
|
||||
} = this.state;
|
||||
const { currency, isDarkTheme, isLoggedIn, navigation, children } = this.props;
|
||||
const activePage = get(navigation.state.params, 'state', 0);
|
||||
@ -339,9 +338,9 @@ class ProfileContainer extends Component {
|
||||
let votingPower;
|
||||
let resourceCredits;
|
||||
|
||||
if (selectedUser) {
|
||||
votingPower = getVotingPower(selectedUser).toFixed(1);
|
||||
resourceCredits = getRcPower(selectedUser).toFixed(1);
|
||||
if (user) {
|
||||
votingPower = getVotingPower(user).toFixed(1);
|
||||
resourceCredits = getRcPower(user).toFixed(1);
|
||||
}
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user