mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-19 03:11:38 +03:00
commit
a073a34873
@ -87,11 +87,8 @@ const UpvoteContainer = (props) => {
|
|||||||
incrementVoteCount();
|
incrementVoteCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isDownvote) {
|
setIsDownVoted(isDownvote ? true : false);
|
||||||
setIsDownVoted(true);
|
setIsVoted(isDownvote ? false : true);
|
||||||
} else {
|
|
||||||
setIsVoted(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -105,11 +102,8 @@ const UpvoteContainer = (props) => {
|
|||||||
incrementVoteCount();
|
incrementVoteCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isDownvote) {
|
setIsDownVoted(isDownvote ? true : false);
|
||||||
setIsDownVoted(true);
|
setIsVoted(isDownvote ? false : true);
|
||||||
} else {
|
|
||||||
setIsVoted(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
setTotalPayout(totalPayout + amountNum);
|
setTotalPayout(totalPayout + amountNum);
|
||||||
//update redux
|
//update redux
|
||||||
|
@ -260,6 +260,7 @@ class ProfileContainer extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_fetchProfile = async (username = null, isProfileAction = false) => {
|
_fetchProfile = async (username = null, isProfileAction = false) => {
|
||||||
|
const { intl } = this.props;
|
||||||
try {
|
try {
|
||||||
const { username: _username, isFollowing, isMuted, isOwnProfile } = this.state;
|
const { username: _username, isFollowing, isMuted, isOwnProfile } = this.state;
|
||||||
|
|
||||||
|
@ -435,6 +435,13 @@ class EditorContainer extends Component {
|
|||||||
id: 'alert.permission_text',
|
id: 'alert.permission_text',
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
}else{
|
||||||
|
Alert.alert(
|
||||||
|
intl.formatMessage({
|
||||||
|
id: 'alert.fail',
|
||||||
|
}),
|
||||||
|
error.message,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -82,6 +82,14 @@ export const parseComments = async (comments) => {
|
|||||||
comment.markdownBody = get(comment, 'body');
|
comment.markdownBody = get(comment, 'body');
|
||||||
comment.body = renderPostBody(comment, true, webp);
|
comment.body = renderPostBody(comment, true, webp);
|
||||||
|
|
||||||
|
//calculate and set total_payout to show to user.
|
||||||
|
const totalPayout =
|
||||||
|
parseAsset(comment.pending_payout_value).amount +
|
||||||
|
parseAsset(comment.author_payout_value).amount +
|
||||||
|
parseAsset(comment.curator_payout_value).amount;
|
||||||
|
|
||||||
|
comment.total_payout = totalPayout;
|
||||||
|
|
||||||
//stamp comments with fetched time;
|
//stamp comments with fetched time;
|
||||||
comment.post_fetched_at = new Date().getTime();
|
comment.post_fetched_at = new Date().getTime();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user