mirror of
https://github.com/wassname/talk.git
synced 2026-07-08 11:27:22 +08:00
More refactor
This commit is contained in:
@@ -194,6 +194,7 @@ class ModerationQueue extends React.Component {
|
||||
const switchedMode = prev.singleView !== this.props.singleView;
|
||||
const selectedDifferentComment = prev.selectedCommentId !== selectedCommentId && selectedCommentId;
|
||||
const moderatedLastComment = prev.comments.length > 0 && this.getCommentCountWithoutDagling() === 0;
|
||||
const hasMoreComment = commentCount > 0;
|
||||
|
||||
if (switchedToMultiMode) {
|
||||
|
||||
@@ -205,7 +206,7 @@ class ModerationQueue extends React.Component {
|
||||
this.scrollToSelectedComment();
|
||||
}
|
||||
|
||||
if (moderatedLastComment && commentCount > 0) {
|
||||
if (moderatedLastComment && hasMoreComment) {
|
||||
this.props.loadMore();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user