Use group name for hidden stories

This commit is contained in:
Josh Perez 2022-10-26 18:34:57 -04:00 committed by GitHub
parent 7b9807d464
commit db557104a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View file

@ -177,17 +177,17 @@ export const StoriesPane = ({
{renderedStories.map(story => (
<StoryListItem
conversationId={story.conversationId}
group={story.group}
getPreferredBadge={getPreferredBadge}
hasReplies={story.hasReplies}
hasRepliesFromSelf={story.hasRepliesFromSelf}
group={story.group}
i18n={i18n}
key={story.storyView.timestamp}
onHideStory={toggleHideStories}
onGoToConversation={conversationId => {
showConversation({ conversationId });
toggleStoriesView();
}}
onHideStory={toggleHideStories}
queueStoryDownload={queueStoryDownload}
story={story.storyView}
viewUserStories={viewUserStories}
@ -210,15 +210,16 @@ export const StoriesPane = ({
hiddenStories.map(story => (
<StoryListItem
conversationId={story.conversationId}
key={story.storyView.timestamp}
getPreferredBadge={getPreferredBadge}
group={story.group}
i18n={i18n}
isHidden
onHideStory={toggleHideStories}
key={story.storyView.timestamp}
onGoToConversation={conversationId => {
showConversation({ conversationId });
toggleStoriesView();
}}
onHideStory={toggleHideStories}
queueStoryDownload={queueStoryDownload}
story={story.storyView}
viewUserStories={viewUserStories}

View file

@ -223,7 +223,6 @@ export function getConversationStory(
story: StoryDataType
): ConversationStoryType {
const sender = pick(conversationSelector(story.sourceUuid || story.source), [
'hideStory',
'id',
]);
@ -231,6 +230,7 @@ export function getConversationStory(
'acceptedMessageRequest',
'avatarPath',
'color',
'hideStory',
'id',
'name',
'profileName',
@ -251,7 +251,7 @@ export function getConversationStory(
group: conversation.id !== sender.id ? conversation : undefined,
hasReplies: story.hasReplies,
hasRepliesFromSelf: story.hasRepliesFromSelf,
isHidden: Boolean(sender.hideStory),
isHidden: Boolean(conversation.hideStory),
storyView,
};
}