Show proper distribution list name in story viewer
This commit is contained in:
parent
6d56f8b8aa
commit
3cc122f756
3 changed files with 13 additions and 8 deletions
|
@ -147,7 +147,7 @@ export const YourStory = Template.bind({});
|
||||||
);
|
);
|
||||||
|
|
||||||
YourStory.args = {
|
YourStory.args = {
|
||||||
distributionListName: 'Close Friends',
|
distributionList: { id: '123', name: 'Close Friends' },
|
||||||
story: {
|
story: {
|
||||||
...storyView,
|
...storyView,
|
||||||
sender: {
|
sender: {
|
||||||
|
|
|
@ -29,22 +29,23 @@ import { Intl } from './Intl';
|
||||||
import { MessageTimestamp } from './conversation/MessageTimestamp';
|
import { MessageTimestamp } from './conversation/MessageTimestamp';
|
||||||
import { SendStatus } from '../messages/MessageSendState';
|
import { SendStatus } from '../messages/MessageSendState';
|
||||||
import { StoryDetailsModal } from './StoryDetailsModal';
|
import { StoryDetailsModal } from './StoryDetailsModal';
|
||||||
import { StoryViewsNRepliesModal } from './StoryViewsNRepliesModal';
|
import { StoryDistributionListName } from './StoryDistributionListName';
|
||||||
import { StoryImage } from './StoryImage';
|
import { StoryImage } from './StoryImage';
|
||||||
import { StoryViewDirectionType, StoryViewModeType } from '../types/Stories';
|
import { StoryViewDirectionType, StoryViewModeType } from '../types/Stories';
|
||||||
|
import { StoryViewsNRepliesModal } from './StoryViewsNRepliesModal';
|
||||||
import { Theme } from '../util/theme';
|
import { Theme } from '../util/theme';
|
||||||
import { ToastType } from '../state/ducks/toast';
|
import { ToastType } from '../state/ducks/toast';
|
||||||
import { getAvatarColor } from '../types/Colors';
|
import { getAvatarColor } from '../types/Colors';
|
||||||
import { getStoryBackground } from '../util/getStoryBackground';
|
import { getStoryBackground } from '../util/getStoryBackground';
|
||||||
import { getStoryDuration } from '../util/getStoryDuration';
|
import { getStoryDuration } from '../util/getStoryDuration';
|
||||||
import { isVideoAttachment } from '../types/Attachment';
|
|
||||||
import { graphemeAwareSlice } from '../util/graphemeAwareSlice';
|
import { graphemeAwareSlice } from '../util/graphemeAwareSlice';
|
||||||
|
import { isVideoAttachment } from '../types/Attachment';
|
||||||
import { useEscapeHandling } from '../hooks/useEscapeHandling';
|
import { useEscapeHandling } from '../hooks/useEscapeHandling';
|
||||||
|
|
||||||
export type PropsType = {
|
export type PropsType = {
|
||||||
currentIndex: number;
|
currentIndex: number;
|
||||||
deleteStoryForEveryone: (story: StoryViewType) => unknown;
|
deleteStoryForEveryone: (story: StoryViewType) => unknown;
|
||||||
distributionListName?: string;
|
distributionList?: { id: string; name: string };
|
||||||
getPreferredBadge: PreferredBadgeSelectorType;
|
getPreferredBadge: PreferredBadgeSelectorType;
|
||||||
group?: Pick<
|
group?: Pick<
|
||||||
ConversationType,
|
ConversationType,
|
||||||
|
@ -105,7 +106,7 @@ enum Arrow {
|
||||||
export const StoryViewer = ({
|
export const StoryViewer = ({
|
||||||
currentIndex,
|
currentIndex,
|
||||||
deleteStoryForEveryone,
|
deleteStoryForEveryone,
|
||||||
distributionListName,
|
distributionList,
|
||||||
getPreferredBadge,
|
getPreferredBadge,
|
||||||
group,
|
group,
|
||||||
hasActiveCall,
|
hasActiveCall,
|
||||||
|
@ -649,9 +650,13 @@ export const StoryViewer = ({
|
||||||
module="StoryViewer__meta--timestamp"
|
module="StoryViewer__meta--timestamp"
|
||||||
timestamp={timestamp}
|
timestamp={timestamp}
|
||||||
/>
|
/>
|
||||||
{distributionListName && (
|
{distributionList && (
|
||||||
<div className="StoryViewer__meta__list">
|
<div className="StoryViewer__meta__list">
|
||||||
{distributionListName}
|
<StoryDistributionListName
|
||||||
|
id={distributionList.id}
|
||||||
|
name={distributionList.name}
|
||||||
|
i18n={i18n}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -84,7 +84,7 @@ export function SmartStoryViewer(): JSX.Element | null {
|
||||||
return (
|
return (
|
||||||
<StoryViewer
|
<StoryViewer
|
||||||
currentIndex={selectedStoryData.currentIndex}
|
currentIndex={selectedStoryData.currentIndex}
|
||||||
distributionListName={distributionList?.name}
|
distributionList={distributionList}
|
||||||
getPreferredBadge={getPreferredBadge}
|
getPreferredBadge={getPreferredBadge}
|
||||||
group={conversationStory.group}
|
group={conversationStory.group}
|
||||||
hasActiveCall={hasActiveCall}
|
hasActiveCall={hasActiveCall}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue