about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/hooks/useIntentHandler.ts3
-rw-r--r--src/state/shell/composer/index.tsx2
-rw-r--r--src/view/com/composer/Composer.tsx2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/hooks/useIntentHandler.ts b/src/lib/hooks/useIntentHandler.ts
index ce1d474d3..98ba4ec02 100644
--- a/src/lib/hooks/useIntentHandler.ts
+++ b/src/lib/hooks/useIntentHandler.ts
@@ -93,9 +93,10 @@ export function useComposeIntent() {
 
       // Whenever a video URI is present, we don't support adding images right now.
       if (videoUri) {
+        const [uri, width, height] = videoUri.split('|')
         openComposer({
           text: text ?? undefined,
-          videoUri,
+          videoUri: {uri, width: Number(width), height: Number(height)},
         })
         return
       }
diff --git a/src/state/shell/composer/index.tsx b/src/state/shell/composer/index.tsx
index 1c3aa6a81..770b0789e 100644
--- a/src/state/shell/composer/index.tsx
+++ b/src/state/shell/composer/index.tsx
@@ -38,7 +38,7 @@ export interface ComposerOpts {
   openEmojiPicker?: (pos: DOMRect | undefined) => void
   text?: string
   imageUris?: {uri: string; width: number; height: number; altText?: string}[]
-  videoUri?: string
+  videoUri?: {uri: string; width: number; height: number}
 }
 
 type StateContext = ComposerOpts | undefined
diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx
index 94c02767e..0189ca9a8 100644
--- a/src/view/com/composer/Composer.tsx
+++ b/src/view/com/composer/Composer.tsx
@@ -218,7 +218,7 @@ export const ComposePost = ({
   // Whenever we receive an initial video uri, we should immediately run compression if necessary
   useEffect(() => {
     if (initVideoUri) {
-      selectVideo({uri: initVideoUri} as ImagePickerAsset)
+      selectVideo(initVideoUri)
     }
   }, [initVideoUri, selectVideo])