Management: Some fixes for groups (#1717)

This commit is contained in:
Alexander Zinchuk 2022-02-20 13:39:12 +02:00
parent c4e4846c3d
commit 34ab245f49
2 changed files with 3 additions and 2 deletions

View File

@ -170,7 +170,7 @@ const ManageChatPrivacyType: FC<OwnProps & StateProps> = ({
</h3> </h3>
<RadioGroup <RadioGroup
selected={isProtected ? 'protected' : 'allowed'} selected={isProtected ? 'protected' : 'allowed'}
name="channel-type" name="forwarding-type"
options={forwardingOptions} options={forwardingOptions}
onChange={handleForwardingOptionChange} onChange={handleForwardingOptionChange}
/> />

View File

@ -93,6 +93,7 @@ const ManageGroup: FC<OwnProps & StateProps> = ({
const [error, setError] = useState<string | undefined>(); const [error, setError] = useState<string | undefined>();
const imageHash = getChatAvatarHash(chat); const imageHash = getChatAvatarHash(chat);
const currentAvatarBlobUrl = useMedia(imageHash, false, ApiMediaFormat.BlobUrl); const currentAvatarBlobUrl = useMedia(imageHash, false, ApiMediaFormat.BlobUrl);
const isPublicGroup = chat.username || hasLinkedChannel;
const lang = useLang(); const lang = useLang();
useHistoryBack(isActive, onClose); useHistoryBack(isActive, onClose);
@ -343,7 +344,7 @@ const ManageGroup: FC<OwnProps & StateProps> = ({
<span className="subtitle">{formatInteger(chat.membersCount ?? 0)}</span> <span className="subtitle">{formatInteger(chat.membersCount ?? 0)}</span>
</ListItem> </ListItem>
{chat.fullInfo && ( {!isPublicGroup && chat.fullInfo && (
<div className="ListItem narrow no-selection"> <div className="ListItem narrow no-selection">
<Checkbox <Checkbox
checked={!chat.fullInfo.isPreHistoryHidden} checked={!chat.fullInfo.isPreHistoryHidden}