From 7d3f35b0c50818d523ed8972d91f482d529e9b95 Mon Sep 17 00:00:00 2001 From: Thomas Zarebczan Date: Tue, 8 Jun 2021 15:36:58 -0400 Subject: [PATCH] improve pop up not identifying your own content in some cases 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 --- ui/component/channelBlockButton/view.jsx | 12 +- ui/component/channelMuteButton/index.js | 5 +- ui/component/channelMuteButton/view.jsx | 15 ++- ui/component/claimList/view.jsx | 3 - ui/component/claimListDiscover/view.jsx | 3 - ui/component/claimMenuList/index.js | 44 +++++-- ui/component/claimMenuList/view.jsx | 142 +++++++++++++++++++++-- ui/component/claimPreview/view.jsx | 6 +- ui/component/claimPreviewTile/view.jsx | 9 +- ui/component/commentMenuList/index.js | 4 +- ui/component/commentMenuList/view.jsx | 6 +- ui/page/channel/view.jsx | 2 +- ui/redux/actions/blocked.js | 47 +++++--- ui/redux/actions/comments.js | 22 ++-- ui/redux/actions/subscriptions.js | 119 ++++++++++--------- ui/redux/selectors/content.js | 21 ++++ 16 files changed, 331 insertions(+), 129 deletions(-) diff --git a/ui/component/channelBlockButton/view.jsx b/ui/component/channelBlockButton/view.jsx index a2dfa7a36..742205258 100644 --- a/ui/component/channelBlockButton/view.jsx +++ b/ui/component/channelBlockButton/view.jsx @@ -6,8 +6,8 @@ type Props = { uri: string, isBlocked: boolean, isBlockingOrUnBlocking: boolean, - doCommentModUnBlock: (string) => void, - doCommentModBlock: (string) => void, + doCommentModUnBlock: (string, boolean) => void, + doCommentModBlock: (string, boolean) => void, }; function ChannelBlockButton(props: Props) { @@ -15,9 +15,9 @@ function ChannelBlockButton(props: Props) { function handleClick() { if (isBlocked) { - doCommentModUnBlock(uri); + doCommentModUnBlock(uri, false); } else { - doCommentModBlock(uri); + doCommentModBlock(uri, false); } } @@ -30,8 +30,8 @@ function ChannelBlockButton(props: Props) { ? __('Unblocking...') : __('Unblock') : isBlockingOrUnBlocking - ? __('Blocking...') - : __('Block') + ? __('Blocking...') + : __('Block') } onClick={handleClick} /> diff --git a/ui/component/channelMuteButton/index.js b/ui/component/channelMuteButton/index.js index 4a9df8dee..781ae1880 100644 --- a/ui/component/channelMuteButton/index.js +++ b/ui/component/channelMuteButton/index.js @@ -1,5 +1,5 @@ import { connect } from 'react-redux'; -import { doToggleMuteChannel } from 'redux/actions/blocked'; +import { doChannelMute, doChannelUnmute } from 'redux/actions/blocked'; import { makeSelectChannelIsMuted } from 'redux/selectors/blocked'; import ChannelMuteButton from './view'; @@ -8,5 +8,6 @@ const select = (state, props) => ({ }); export default connect(select, { - doToggleMuteChannel, + doChannelMute, + doChannelUnmute, })(ChannelMuteButton); diff --git a/ui/component/channelMuteButton/view.jsx b/ui/component/channelMuteButton/view.jsx index 53d4a4b0e..2ffa6866b 100644 --- a/ui/component/channelMuteButton/view.jsx +++ b/ui/component/channelMuteButton/view.jsx @@ -6,17 +6,26 @@ type Props = { uri: string, isMuted: boolean, channelClaim: ?ChannelClaim, - doToggleMuteChannel: (string) => void, + doChannelMute: (string, boolean) => void, + doChannelUnmute: (string, boolean) => void, }; function ChannelBlockButton(props: Props) { - const { uri, doToggleMuteChannel, isMuted } = props; + const { uri, doChannelMute, doChannelUnmute, isMuted } = props; + + function handleClick() { + if (isMuted) { + doChannelUnmute(uri, false); + } else { + doChannelMute(uri, false); + } + } return (