Page MenuHomePhabricator

D6746.id22858.diff
No OneTemporary

D6746.id22858.diff

diff --git a/web/selectors/thread-selectors.js b/web/selectors/thread-selectors.js
--- a/web/selectors/thread-selectors.js
+++ b/web/selectors/thread-selectors.js
@@ -108,9 +108,22 @@
);
}
+function useDrawerSelectedThreadID(): ?string {
+ const activeChatThreadID = useSelector(
+ state => state.navInfo.activeChatThreadID,
+ );
+ const pickedCommunityID = useSelector(
+ state => state.calendarPickedCommunityID,
+ );
+ const inCalendar = useSelector(state => state.navInfo.tab === 'calendar');
+
+ return inCalendar ? pickedCommunityID : activeChatThreadID;
+}
+
export {
useOnClickThread,
useThreadIsActive,
useOnClickPendingSidebar,
useOnClickNewThread,
+ useDrawerSelectedThreadID,
};

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 3:48 PM (20 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2580362
Default Alt Text
D6746.id22858.diff (725 B)

Event Timeline