fix camera roll gif selection hanging on ios (#11074)

This commit is contained in:
Spence Pope
2026-07-06 17:53:37 -04:00
committed by GitHub
parent 651a3f8af4
commit 4f5119fac0
+8 -2
View File
@@ -389,9 +389,15 @@ export const ComposePost = ({
/*
* Share-extension deeplinks deliver a video URI without duration, so
* probe before we decide whether to compress. The picker and web paste
* paths already populate duration upstream.
* paths already populate duration upstream. GIFs must skip the probe:
* they have no video track, so the iOS prober never resolves or rejects
* and the await below would hang forever.
*/
if (asset.duration == null && IS_NATIVE) {
if (
asset.duration == null &&
IS_NATIVE &&
asset.mimeType !== 'image/gif'
) {
try {
const probed = await getVideoMetadata(asset.uri)
asset = {