mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-02 09:37:47 +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(() => {
|
||||
if (selectedMemberIds.length) {
|
||||
if (selectedMemberIds.length || isChannel) {
|
||||
setGlobalSearchQuery({ query: '' });
|
||||
onNextStep();
|
||||
}
|
||||
}, [selectedMemberIds, setGlobalSearchQuery, onNextStep]);
|
||||
}, [selectedMemberIds.length, isChannel, setGlobalSearchQuery, onNextStep]);
|
||||
|
||||
const lang = useLang();
|
||||
|
||||
@ -136,7 +136,7 @@ const NewChatStep1: FC<OwnProps & StateProps & DispatchProps> = ({
|
||||
/>
|
||||
|
||||
<FloatingActionButton
|
||||
isShown={Boolean(selectedMemberIds.length)}
|
||||
isShown={Boolean(selectedMemberIds.length || isChannel)}
|
||||
onClick={handleNextStep}
|
||||
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>
|
||||
)}
|
||||
|
||||
{memberIds.length > 0 && (
|
||||
<>
|
||||
<h3 className="chat-members-heading">{lang('GroupInfo.ParticipantCount', memberIds.length, 'i')}</h3>
|
||||
|
||||
<div className="chat-members-list custom-scroll">
|
||||
@ -163,6 +165,8 @@ const NewChatStep2: FC<OwnProps & StateProps & DispatchProps> = ({
|
||||
</ListItem>
|
||||
))}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<FloatingActionButton
|
||||
|
Loading…
Reference in New Issue
Block a user