Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32611448
D6746.1767449612.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
725 B
Referenced Files
None
Subscribers
None
D6746.1767449612.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 3, 2:13 PM (5 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5889174
Default Alt Text
D6746.1767449612.diff (725 B)
Attached To
Mode
D6746: [web] Add a selector for getting the item currently selected in the drawer
Attached
Detach File
Event Timeline
Log In to Comment