Take 'incognito' into account when reposting
## Issue Fixes 5661: can't choose anonymous from channel on repost page
This commit is contained in:
parent
d91530b0c8
commit
9fadf3850f
2 changed files with 5 additions and 2 deletions
|
@ -17,7 +17,7 @@ import {
|
|||
selectFetchingMyChannels,
|
||||
} from 'lbry-redux';
|
||||
import { doToast } from 'redux/actions/notifications';
|
||||
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
||||
import { selectActiveChannelClaim, selectIncognito } from 'redux/selectors/app';
|
||||
import RepostCreate from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
|
@ -37,6 +37,7 @@ const select = (state, props) => ({
|
|||
isResolvingEnteredRepost: props.repostUri && makeSelectIsUriResolving(`lbry://${props.repostUri}`)(state),
|
||||
activeChannelClaim: selectActiveChannelClaim(state),
|
||||
fetchingMyChannels: selectFetchingMyChannels(state),
|
||||
incognito: selectIncognito(state),
|
||||
});
|
||||
|
||||
export default connect(select, {
|
||||
|
|
|
@ -42,6 +42,7 @@ type Props = {
|
|||
isResolvingEnteredRepost: boolean,
|
||||
activeChannelClaim: ?ChannelClaim,
|
||||
fetchingMyChannels: boolean,
|
||||
incognito: boolean,
|
||||
};
|
||||
|
||||
function RepostCreate(props: Props) {
|
||||
|
@ -67,6 +68,7 @@ function RepostCreate(props: Props) {
|
|||
isResolvingEnteredRepost,
|
||||
activeChannelClaim,
|
||||
fetchingMyChannels,
|
||||
incognito,
|
||||
} = props;
|
||||
|
||||
const defaultName = name || (claim && claim.name) || '';
|
||||
|
@ -281,7 +283,7 @@ function RepostCreate(props: Props) {
|
|||
doRepost({
|
||||
name: enteredRepostName,
|
||||
bid: creditsToString(repostBid),
|
||||
channel_id: activeChannelClaim ? activeChannelClaim.claim_id : undefined,
|
||||
channel_id: activeChannelClaim && !incognito ? activeChannelClaim.claim_id : undefined,
|
||||
claim_id: repostClaimId,
|
||||
}).then((repostClaim: StreamClaim) => {
|
||||
doCheckPendingClaims();
|
||||
|
|
Loading…
Add table
Reference in a new issue