e361289c06
https://discord.com/channels/362322208485277697/363087331475062785/815132676293918730 - Renamed `closeInlinePlayer` to `clearPlayingUri` to reflect it's actual function. - Add additional check to see if the current video is actually inline before closing it. Wanted to refactor out an actual `closeInlinePlayer`, but let's wait until there are more usages.
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 { doToggleMuteChannel } 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)),
|
|
blockChannel: (channelUri) => dispatch(doToggleMuteChannel(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);
|