Skip to content

Commit c47a50e

Browse files
committed
fix iPad incoming share routing and send attachment from files (keybase#23782)
1 parent d95fe82 commit c47a50e

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

shared/chat/conversation/attachment-get-titles/container.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import * as FsTypes from '../../../constants/types/fs'
55
import GetTitles, {Info} from '.'
66
import * as Container from '../../../util/container'
77
import * as RouteTreeGen from '../../../actions/route-tree-gen'
8-
import * as Tabs from '../../../constants/tabs'
98

109
type OwnProps = Container.RouteProps<{
1110
conversationIDKey: Types.ConversationIDKey
@@ -55,13 +54,6 @@ export default Container.connect(
5554
dispatch(RouteTreeGen.createClearModals())
5655

5756
if (selectConversationWithReason) {
58-
dispatch(
59-
RouteTreeGen.createResetStack({
60-
actions: [],
61-
index: 0,
62-
tab: Tabs.chatTab,
63-
})
64-
)
6557
dispatch(Chat2Gen.createNavigateToThread({conversationIDKey, reason: selectConversationWithReason}))
6658
}
6759
},

shared/fs/send-to-chat/attachment/index.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const MobileSendAttachmentToChat = (props: Props) => {
2828
const incomingShareItems = Container.getRouteProps(props, 'incomingShareItems', undefined)
2929
const useOriginal = Container.getRouteProps(props, 'useOriginal', false)
3030
const url = Container.getRouteProps(props, 'url', undefined)
31-
const path = Container.getRouteProps(props, 'path', undefined) ?? Constants.defaultPath
31+
const path = Container.getRouteProps(props, 'path', undefined)
3232
const isFromShareExtension = !!Container.getRouteProps(props, 'incomingShareItems', undefined)
3333
const dispatch = Container.useDispatch()
3434

@@ -37,8 +37,8 @@ const MobileSendAttachmentToChat = (props: Props) => {
3737
// as an attachment.
3838
?.filter(item => !isChatText(item))
3939
?.map(({originalPath, scaledPath}) => (useOriginal ? originalPath : scaledPath || originalPath))
40-
const pathsFromUrl = url ? [url] : []
41-
const pathsFromPath = path ? [path] : []
40+
const pathsFromUrl = url ? [url] : undefined
41+
const pathsFromPath = path ? [path] : undefined
4242
const sendPaths = pathsFromIncomingShare || pathsFromUrl || pathsFromPath || []
4343
const text =
4444
incomingShareItems
@@ -68,7 +68,6 @@ const MobileSendAttachmentToChat = (props: Props) => {
6868
})
6969
)
7070
} else {
71-
dispatch(RouteTreeGen.createClearModals())
7271
dispatch(
7372
Chat2Gen.createNavigateToThread({
7473
conversationIDKey,

0 commit comments

Comments
 (0)