mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-23 05:13:04 +03:00
fix comments merge
This commit is contained in:
parent
e3a346791d
commit
70b4b3f449
@ -23,6 +23,7 @@ import { getIsFavorite, addFavorite, removeFavorite } from '../providers/esteem/
|
|||||||
|
|
||||||
// Utilitites
|
// Utilitites
|
||||||
import { getRcPower, getVotingPower } from '../utils/manaBar';
|
import { getRcPower, getVotingPower } from '../utils/manaBar';
|
||||||
|
import { unionWith } from '../utils/postParser';
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
import { default as ROUTES } from '../constants/routeNames';
|
import { default as ROUTES } from '../constants/routeNames';
|
||||||
@ -77,7 +78,7 @@ class ProfileContainer extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_getReplies = async query => {
|
_getReplies = async query => {
|
||||||
const { isOwnProfile } = this.state;
|
const { isOwnProfile, comments } = this.state;
|
||||||
let repliesAction;
|
let repliesAction;
|
||||||
|
|
||||||
if (!isOwnProfile) {
|
if (!isOwnProfile) {
|
||||||
@ -85,16 +86,18 @@ class ProfileContainer extends Component {
|
|||||||
} else {
|
} else {
|
||||||
repliesAction = getRepliesByLastUpdate;
|
repliesAction = getRepliesByLastUpdate;
|
||||||
}
|
}
|
||||||
|
if (query) {
|
||||||
await repliesAction({
|
await repliesAction({
|
||||||
start_author: query.author,
|
start_author: query.author,
|
||||||
start_permlink: query.permlink,
|
start_permlink: query.permlink,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
}).then(result => {
|
}).then(result => {
|
||||||
|
let _comments = unionWith(comments, result, 'permlink');
|
||||||
this.setState({
|
this.setState({
|
||||||
comments: result,
|
comments: _comments,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_handleFollowUnfollowUser = async isFollowAction => {
|
_handleFollowUnfollowUser = async isFollowAction => {
|
||||||
|
Loading…
Reference in New Issue
Block a user