Skip to content

Commit

Permalink
chore: review tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
dougfabris committed Aug 23, 2024
1 parent 11edf0a commit 6ca3131
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ const EditRoomInfo = ({ room, onClickClose, onClickBack }: EditRoomInfoProps) =>
const retentionIgnoreThreads = useUniqueId();

const showAdvancedSettings = canViewEncrypted || canViewReadOnly || readOnly || canViewArchived || canViewJoinCode || canViewHideSysMes;
const showPruneSection = canEditRoomRetentionPolicy && retentionPolicy?.enabled;
const showRetentionPolicy = canEditRoomRetentionPolicy && retentionPolicy?.enabled;

const showAccordion = showAdvancedSettings || showPruneSection;
const showAccordion = showAdvancedSettings || showRetentionPolicy;

return (
<>
Expand Down Expand Up @@ -322,7 +322,6 @@ const EditRoomInfo = ({ room, onClickClose, onClickBack }: EditRoomInfoProps) =>
</FieldRow>
</Field>
)}

{canViewType && (
<Field>
<FieldRow>
Expand Down Expand Up @@ -360,7 +359,6 @@ const EditRoomInfo = ({ room, onClickClose, onClickBack }: EditRoomInfoProps) =>
<Box is='h5' fontScale='h5' color='titles-labels'>
{t('Security_and_permissions')}
</Box>

{canViewEncrypted && (
<Field>
<FieldRow>
Expand Down Expand Up @@ -513,8 +511,7 @@ const EditRoomInfo = ({ room, onClickClose, onClickBack }: EditRoomInfoProps) =>
</FieldGroup>
</AccordionItem>
)}

{showPruneSection && (
{showRetentionPolicy && (
<AccordionItem title={t('Prune')}>
<FieldGroup>
<Field>
Expand Down

0 comments on commit 6ca3131

Please sign in to comment.