#6557 CommentCreate: hold off "create channel" redirect until channel_list is fetched.
This commit is contained in:
parent
e1fc5fd6e3
commit
6e6fd61e90
2 changed files with 5 additions and 4 deletions
|
@ -37,6 +37,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
- Fix embed shows wrong OG metadata _community pr!_ ([#6815](https://github.com/lbryio/lbry-desktop/pull/6815))
|
||||
- Fix OG: "Unparsable data structure - Truncated Unicode character" _community pr!_ ([#6839](https://github.com/lbryio/lbry-desktop/pull/6839))
|
||||
- Fix Paid embed warning overlay redirection button now links to odysee _community pr!_ ([#6819](https://github.com/lbryio/lbry-desktop/pull/6819))
|
||||
- Fix comment section redirection to create channel _community pr!_ ([#6557](https://github.com/lbryio/lbry-desktop/pull/6557))
|
||||
|
||||
## [0.51.1] - [2021-06-26]
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@ type Props = {
|
|||
claimIsMine: boolean,
|
||||
sendTip: ({}, (any) => void, (any) => void) => void,
|
||||
doToast: ({ message: string }) => void,
|
||||
disabled: boolean,
|
||||
doFetchCreatorSettings: (channelId: string) => Promise<any>,
|
||||
settingsByChannelId: { [channelId: string]: PerChannelSettings },
|
||||
};
|
||||
|
@ -95,7 +94,7 @@ export function CommentCreate(props: Props) {
|
|||
const charCount = commentValue.length;
|
||||
const [activeTab, setActiveTab] = React.useState('');
|
||||
const [tipError, setTipError] = React.useState();
|
||||
const disabled = isSubmitting || !activeChannelClaim || !commentValue.length;
|
||||
const disabled = isSubmitting || isFetchingChannels || !commentValue.length;
|
||||
const [shouldDisableReviewButton, setShouldDisableReviewButton] = React.useState();
|
||||
const channelId = getChannelIdFromClaim(claim);
|
||||
const channelSettings = channelId ? settingsByChannelId[channelId] : undefined;
|
||||
|
@ -370,7 +369,7 @@ export function CommentCreate(props: Props) {
|
|||
return <Empty padded text={__('This channel has disabled comments on their page.')} />;
|
||||
}
|
||||
|
||||
if (!hasChannels) {
|
||||
if (!isFetchingChannels && !hasChannels) {
|
||||
return (
|
||||
<div
|
||||
role="button"
|
||||
|
@ -454,7 +453,7 @@ export function CommentCreate(props: Props) {
|
|||
})}
|
||||
>
|
||||
<FormField
|
||||
disabled={!activeChannelClaim}
|
||||
disabled={isFetchingChannels}
|
||||
type={SIMPLE_SITE ? 'textarea' : advancedEditor && !isReply ? 'markdown' : 'textarea'}
|
||||
name={isReply ? 'content_reply' : 'content_description'}
|
||||
label={
|
||||
|
@ -498,6 +497,7 @@ export function CommentCreate(props: Props) {
|
|||
icon={activeTab === TAB_LBC ? ICONS.LBC : ICONS.FINANCE}
|
||||
label={__('Review')}
|
||||
onClick={() => setIsReviewingSupportComment(true)}
|
||||
requiresAuth={IS_WEB}
|
||||
/>
|
||||
|
||||
<Button disabled={disabled} button="link" label={__('Cancel')} onClick={() => setIsSupportComment(false)} />
|
||||
|
|
Loading…
Reference in a new issue