Page MenuHomePhabricator

D4466.id14394.diff
No OneTemporary

D4466.id14394.diff

diff --git a/web/selectors/nav-selectors.js b/web/selectors/nav-selectors.js
--- a/web/selectors/nav-selectors.js
+++ b/web/selectors/nav-selectors.js
@@ -195,6 +195,23 @@
);
}
+function useOnClickNewThread(): (event: SyntheticEvent<HTMLElement>) => void {
+ const dispatch = useDispatch();
+ return React.useCallback(
+ (event: SyntheticEvent<HTMLElement>) => {
+ event.preventDefault();
+ dispatch({
+ type: updateNavInfoActionType,
+ payload: {
+ chatMode: 'create',
+ selectedUserList: [],
+ },
+ });
+ },
+ [dispatch],
+ );
+}
+
function navTabSelector(state: AppState): NavigationTab {
return state.navInfo.tab;
}
@@ -216,6 +233,7 @@
useOnClickThread,
useThreadIsActive,
useOnClickPendingSidebar,
+ useOnClickNewThread,
navTabSelector,
navSettingsSectionSelector,
};

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 8, 12:45 PM (2 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2817522
Default Alt Text
D4466.id14394.diff (868 B)

Event Timeline