From 65b5d31b581ad9f6c46a76175643437cd113903b Mon Sep 17 00:00:00 2001 From: Hailey Date: Wed, 10 Jul 2024 12:25:44 -0700 Subject: [PATCH] Fix alt text for GIFs (#4766) * fix alt text dialog for gifs * only apply to native --- src/view/com/composer/GifAltText.tsx | 9 +++++++-- src/view/com/util/post-embeds/GifEmbed.tsx | 13 +++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/view/com/composer/GifAltText.tsx b/src/view/com/composer/GifAltText.tsx index b1f10bf2..b7690e10 100644 --- a/src/view/com/composer/GifAltText.tsx +++ b/src/view/com/composer/GifAltText.tsx @@ -174,8 +174,13 @@ function AltTextInner({ Add alt text - - + + diff --git a/src/view/com/util/post-embeds/GifEmbed.tsx b/src/view/com/util/post-embeds/GifEmbed.tsx index 5e3a6939..31c4419b 100644 --- a/src/view/com/util/post-embeds/GifEmbed.tsx +++ b/src/view/com/util/post-embeds/GifEmbed.tsx @@ -1,5 +1,12 @@ import React from 'react' -import {Pressable, StyleSheet, TouchableOpacity, View} from 'react-native' +import { + Pressable, + StyleProp, + StyleSheet, + TouchableOpacity, + View, + ViewStyle, +} from 'react-native' import {AppBskyEmbedExternal} from '@atproto/api' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import {msg, Trans} from '@lingui/macro' @@ -89,10 +96,12 @@ export function GifEmbed({ params, link, hideAlt, + style = {width: '100%'}, }: { params: EmbedPlayerParams link: AppBskyEmbedExternal.ViewExternal hideAlt?: boolean + style?: StyleProp }) { const {_} = useLingui() const autoplayDisabled = useAutoplayDisabled() @@ -124,7 +133,7 @@ export function GifEmbed({ ) return ( - +