mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-02 17:48:34 +01:00
Fix Create Chat: Can't create a channel without subscribers (#1115)
This commit is contained in:
parent
e2daa2a9a6
commit
5c1df65a0c
@ -101,11 +101,11 @@ const NewChatStep1: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
const handleNextStep = useCallback(() => {
|
const handleNextStep = useCallback(() => {
|
||||||
if (selectedMemberIds.length) {
|
if (selectedMemberIds.length || isChannel) {
|
||||||
setGlobalSearchQuery({ query: '' });
|
setGlobalSearchQuery({ query: '' });
|
||||||
onNextStep();
|
onNextStep();
|
||||||
}
|
}
|
||||||
}, [selectedMemberIds, setGlobalSearchQuery, onNextStep]);
|
}, [selectedMemberIds.length, isChannel, setGlobalSearchQuery, onNextStep]);
|
||||||
|
|
||||||
const lang = useLang();
|
const lang = useLang();
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ const NewChatStep1: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<FloatingActionButton
|
<FloatingActionButton
|
||||||
isShown={Boolean(selectedMemberIds.length)}
|
isShown={Boolean(selectedMemberIds.length || isChannel)}
|
||||||
onClick={handleNextStep}
|
onClick={handleNextStep}
|
||||||
ariaLabel={isChannel ? 'Continue To Channel Info' : 'Continue To Group Info'}
|
ariaLabel={isChannel ? 'Continue To Channel Info' : 'Continue To Group Info'}
|
||||||
>
|
>
|
||||||
|
@ -154,6 +154,8 @@ const NewChatStep2: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
<p className="error">{renderedError}</p>
|
<p className="error">{renderedError}</p>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{memberIds.length > 0 && (
|
||||||
|
<>
|
||||||
<h3 className="chat-members-heading">{lang('GroupInfo.ParticipantCount', memberIds.length, 'i')}</h3>
|
<h3 className="chat-members-heading">{lang('GroupInfo.ParticipantCount', memberIds.length, 'i')}</h3>
|
||||||
|
|
||||||
<div className="chat-members-list custom-scroll">
|
<div className="chat-members-list custom-scroll">
|
||||||
@ -163,6 +165,8 @@ const NewChatStep2: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
</ListItem>
|
</ListItem>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<FloatingActionButton
|
<FloatingActionButton
|
||||||
|
Loading…
Reference in New Issue
Block a user