mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-23 17:47:24 +00:00
edit option delete option analytics for channel claim support option follow option fix revert subscription actions block actions mute actions block and mute buttons mute menu option lint handle edit channel fix comment mute logic analytics handle delete channel fix claimismine fix rebase
29 lines
1.5 KiB
JavaScript
29 lines
1.5 KiB
JavaScript
import { connect } from 'react-redux';
|
|
import { makeSelectChannelPermUrlForClaimUri, makeSelectClaimIsMine, makeSelectClaimForUri } from 'lbry-redux';
|
|
import { doCommentAbandon, doCommentPin, doCommentList, doCommentModBlock } from 'redux/actions/comments';
|
|
import { doChannelMute } from 'redux/actions/blocked';
|
|
// import { doSetActiveChannel } from 'redux/actions/app';
|
|
import { doSetPlayingUri } from 'redux/actions/content';
|
|
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
|
import { selectPlayingUri } from 'redux/selectors/content';
|
|
import CommentMenuList from './view';
|
|
|
|
const select = (state, props) => ({
|
|
claim: makeSelectClaimForUri(props.uri)(state),
|
|
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
|
|
contentChannelPermanentUrl: makeSelectChannelPermUrlForClaimUri(props.uri)(state),
|
|
activeChannelClaim: selectActiveChannelClaim(state),
|
|
playingUri: selectPlayingUri(state),
|
|
});
|
|
|
|
const perform = (dispatch) => ({
|
|
clearPlayingUri: () => dispatch(doSetPlayingUri({ uri: null })),
|
|
deleteComment: (commentId, creatorChannelUrl) => dispatch(doCommentAbandon(commentId, creatorChannelUrl)),
|
|
muteChannel: (channelUri) => dispatch(doChannelMute(channelUri)),
|
|
pinComment: (commentId, remove) => dispatch(doCommentPin(commentId, remove)),
|
|
fetchComments: (uri) => dispatch(doCommentList(uri)),
|
|
// setActiveChannel: channelId => dispatch(doSetActiveChannel(channelId)),
|
|
commentModBlock: (commentAuthor) => dispatch(doCommentModBlock(commentAuthor)),
|
|
});
|
|
|
|
export default connect(select, perform)(CommentMenuList);
|