Skip to content

Commit 977a880

Browse files
Fixed reply count.
1 parent 35441c2 commit 977a880

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

screen/data/showkeyvalue.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -382,13 +382,14 @@ class ShowKeyValue extends React.Component {
382382

383383
updateReplies = (reply) => {
384384
const {index, type, hashtags, updateHashtag} = this.props.navigation.state.params;
385+
let currentLength = this.state.replies.length;
385386
this.setState({
386387
replies: [reply, ...this.state.replies]
387388
});
388389

389390
if (type == 'hashtag' && updateHashtag) {
390391
let keyValue = hashtags[index];
391-
keyValue.replies = keyValue.replies + 1;
392+
keyValue.replies = currentLength + 1;
392393
updateHashtag(index, keyValue);
393394
}
394395
}

0 commit comments

Comments
 (0)