From 0a7732826ded95d178256aa6542bd8e087ea1336 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Thu, 5 Feb 2026 11:01:42 -0600 Subject: [PATCH] tweaks to gif presentation --- .../VideoEmbed/GifPresentationControls.tsx | 24 ++++---- .../Post/Embed/VideoEmbed/index.tsx | 56 +++++++++++-------- 2 files changed, 46 insertions(+), 34 deletions(-) diff --git a/src/components/Post/Embed/VideoEmbed/GifPresentationControls.tsx b/src/components/Post/Embed/VideoEmbed/GifPresentationControls.tsx index 42098a7e9c..f89e5a8ef0 100644 --- a/src/components/Post/Embed/VideoEmbed/GifPresentationControls.tsx +++ b/src/components/Post/Embed/VideoEmbed/GifPresentationControls.tsx @@ -1,11 +1,16 @@ -import {Pressable, StyleSheet, TouchableOpacity, View} from 'react-native' +import { + ActivityIndicator, + StyleSheet, + TouchableOpacity, + View, +} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {HITSLOP_20} from '#/lib/constants' import {atoms as a, useTheme} from '#/alf' +import {Button} from '#/components/Button' import {Fill} from '#/components/Fill' -import {Loader} from '#/components/Loader' import * as Prompt from '#/components/Prompt' import {Text} from '#/components/Typography' import {PlayButtonIcon} from '#/components/video/PlayButtonIcon' @@ -26,28 +31,27 @@ export function GifPresentationControls({ return ( <> - {isLoading ? ( - + ) : !isPlaying ? ( - ) : undefined} - + ) : ( + <> + )} + {!isPlaying && ( - {showOverlay && ( - - )} + {showOverlay && + (embed.presentation === 'gif' ? ( + { + ref.current?.togglePlayback() + }} + altText={embed.alt} + /> + ) : ( + + ))} )