From 6e7092c294a04d450e951aa65f6f2849c257287e Mon Sep 17 00:00:00 2001 From: Josh Perez <60019601+josh-signal@users.noreply.github.com> Date: Fri, 29 Apr 2022 13:43:24 -0400 Subject: [PATCH] Functional context menu in story viewer --- ts/components/Stories.tsx | 2 +- ts/components/StoriesPane.tsx | 16 +++--- ts/components/StoryListItem.stories.tsx | 2 + ts/components/StoryListItem.tsx | 10 ++-- ts/components/StoryViewer.stories.tsx | 2 + ts/components/StoryViewer.tsx | 76 +++++++++++++++++++++++-- ts/state/smart/StoryViewer.tsx | 10 +++- 7 files changed, 98 insertions(+), 20 deletions(-) diff --git a/ts/components/Stories.tsx b/ts/components/Stories.tsx index 4b87c6d7f..462ce4a72 100644 --- a/ts/components/Stories.tsx +++ b/ts/components/Stories.tsx @@ -95,12 +95,12 @@ export const Stories = ({ diff --git a/ts/components/StoriesPane.tsx b/ts/components/StoriesPane.tsx index 369feb59a..172f3c9d0 100644 --- a/ts/components/StoriesPane.tsx +++ b/ts/components/StoriesPane.tsx @@ -52,23 +52,23 @@ function getNewestStory(story: ConversationStoryType): StoryViewType { export type PropsType = { hiddenStories: Array; i18n: LocalizerType; - onBack: () => unknown; onStoryClicked: (conversationId: string) => unknown; openConversationInternal: (_: { conversationId: string }) => unknown; queueStoryDownload: (storyId: string) => unknown; stories: Array; toggleHideStories: (conversationId: string) => unknown; + toggleStoriesView: () => unknown; }; export const StoriesPane = ({ hiddenStories, i18n, - onBack, onStoryClicked, openConversationInternal, queueStoryDownload, stories, toggleHideStories, + toggleStoriesView, }: PropsType): JSX.Element => { const [searchTerm, setSearchTerm] = useState(''); const [isShowingHiddenStories, setIsShowingHiddenStories] = useState(false); @@ -89,7 +89,7 @@ export const StoriesPane = ({