Skip to content

Commit

Permalink
jump to conversation after forwarding (#24172)
Browse files Browse the repository at this point in the history
* navigate after forward

* jump to conversation after forwarding
  • Loading branch information
joshblum committed May 18, 2020
1 parent 0cf4fdb commit be3df66
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions shared/actions/chat2-gen.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion shared/actions/json/chat2.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"'teamMention'",
"'appLink'",
"'search'",
"'journeyCardPopular'"
"'journeyCardPopular'",
"'forward'"
]
},
"createConversation": {
Expand Down
4 changes: 2 additions & 2 deletions shared/actions/json/route-tree.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"prelude": [
"import * as Tabs from '../constants/tabs'",
"import * as Types from '../constants/types/route-tree'",
"import * as Tabs from '../constants/tabs'",
"import * as Types from '../constants/types/route-tree'",
],
"actions": {
"navigateAppend": {
Expand Down
7 changes: 7 additions & 0 deletions shared/chat/conversation/fwd-msg/team-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as Container from '../../../util/container'
import * as RPCChatTypes from '../../../constants/types/rpc-chat-gen'
import * as RPCTypes from '../../../constants/types/rpc-gen'
import * as RouteTreeGen from '../../../actions/route-tree-gen'
import * as Chat2Gen from '../../../actions/chat2-gen'
import * as Types from '../../../constants/types/chat2'
import * as Constants from '../../../constants/chat2'
import {Avatars, TeamAvatar} from '../../avatars'
Expand Down Expand Up @@ -67,6 +68,12 @@ const TeamPicker = (props: Props) => {
}
)
dispatch(RouteTreeGen.createClearModals())
dispatch(
Chat2Gen.createPreviewConversation({
conversationIDKey: Types.conversationIDToKey(dstConvID),
reason: 'forward',
})
)
}
React.useEffect(() => {
doSearch()
Expand Down

0 comments on commit be3df66

Please sign in to comment.