Fixes My Story subtitle label in privacy modal

This commit is contained in:
Josh Perez 2022-11-09 21:25:45 -05:00 committed by GitHub
parent 9de31d1b1c
commit 42a1394039
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 17 deletions

View file

@ -12,6 +12,7 @@ import type { LocalizerType } from '../types/Util';
import type { PreferredBadgeSelectorType } from '../state/selectors/badges';
import type { PropsType as StoriesSettingsModalPropsType } from './StoriesSettingsModal';
import {
getI18nForMyStory,
getListViewers,
DistributionListSettingsModal,
EditDistributionListModal,
@ -107,18 +108,6 @@ function getListMemberUuids(
return memberUuids;
}
function getKeyForMyStoryType(list: StoryDistributionListWithMembersDataType) {
if (list.members.length === 0) {
return 'StoriesSettings__mine__all--label';
}
if (!list.isBlockList) {
return 'SendStoryModal__only-share-with';
}
return 'StoriesSettings__mine__all--label';
}
export const SendStoryModal = ({
draftAttachment,
candidateConversations,
@ -721,7 +710,7 @@ export const SendStoryModal = ({
<>
<span className="SendStoryModal__rtl-span">
{list.id === MY_STORIES_ID
? i18n(getKeyForMyStoryType(list))
? getI18nForMyStory(list, i18n)
: i18n('SendStoryModal__custom-story')}
</span>
<span className="SendStoryModal__rtl-span">