mirror of
https://github.com/wassname/talk.git
synced 2026-07-05 05:23:17 +08:00
Emit ui.AllCommentsPane.viewNewComments and ui.Comment.showMoreReplies
This commit is contained in:
@@ -93,6 +93,7 @@ class AllCommentsPane extends React.Component {
|
||||
|
||||
viewNewComments = () => {
|
||||
this.setState(resetCursors);
|
||||
this.props.emit('ui.AllCommentsPane.viewNewComments');
|
||||
};
|
||||
|
||||
// getVisibileComments returns a list containing comments
|
||||
@@ -142,6 +143,7 @@ class AllCommentsPane extends React.Component {
|
||||
charCountEnable,
|
||||
maxCharCount,
|
||||
editComment,
|
||||
emit,
|
||||
} = this.props;
|
||||
|
||||
const {loadingState} = this.state;
|
||||
@@ -181,6 +183,7 @@ class AllCommentsPane extends React.Component {
|
||||
charCountEnable={charCountEnable}
|
||||
maxCharCount={maxCharCount}
|
||||
editComment={editComment}
|
||||
emit={emit}
|
||||
/>;
|
||||
})}
|
||||
</TransitionGroup>
|
||||
|
||||
@@ -224,6 +224,7 @@ export default class Comment extends React.Component {
|
||||
return;
|
||||
}
|
||||
this.setState(resetCursors);
|
||||
this.props.emit('ui.Comment.showMoreReplies');
|
||||
};
|
||||
|
||||
showReplyBox = () => {
|
||||
|
||||
@@ -292,6 +292,7 @@ class Stream extends React.Component {
|
||||
charCountEnable={asset.settings.charCountEnable}
|
||||
maxCharCount={asset.settings.charCount}
|
||||
editComment={editComment}
|
||||
emit={this.props.emit}
|
||||
/>
|
||||
</TabPane>
|
||||
</TabContent>
|
||||
|
||||
@@ -14,7 +14,7 @@ import {editName} from 'coral-framework/actions/user';
|
||||
import {setActiveReplyBox, setActiveTab, viewAllComments} from '../actions/stream';
|
||||
import Stream from '../components/Stream';
|
||||
import Comment from './Comment';
|
||||
import {withFragments} from 'coral-framework/hocs';
|
||||
import {withFragments, withEmit} from 'coral-framework/hocs';
|
||||
import {getDefinitionName, getSlotFragmentSpreads} from 'coral-framework/utils';
|
||||
import {Spinner} from 'coral-ui';
|
||||
import {
|
||||
@@ -326,6 +326,7 @@ const mapDispatchToProps = (dispatch) =>
|
||||
|
||||
export default compose(
|
||||
withFragments(fragments),
|
||||
withEmit,
|
||||
connect(mapStateToProps, mapDispatchToProps),
|
||||
withPostComment,
|
||||
withPostFlag,
|
||||
|
||||
@@ -3,3 +3,4 @@ export {default as withTags} from './withTags';
|
||||
export {default as withFragments} from 'coral-framework/hocs/withFragments';
|
||||
export {default as excludeIf} from 'coral-framework/hocs/excludeIf';
|
||||
export {default as connect} from 'coral-framework/hocs/connect';
|
||||
export {default as withEmit} from 'coral-framework/hocs/withEmit';
|
||||
|
||||
Reference in New Issue
Block a user