diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-06-19 22:32:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-20 00:32:44 +0300 |
commit | 0f931933a7b7b72505fbab6e1f25860f7a84e59c (patch) | |
tree | f0ca1407e9fabd8cac7d1e2af0c7c09678a92a92 /src/view/com/util/post-embeds/GifEmbed.tsx | |
parent | 22c5aa4da4e8835f2694e1590c27b2e5783d3cc4 (diff) | |
download | voidsky-0f931933a7b7b72505fbab6e1f25860f7a84e59c.tar.zst |
Option for large alt badges (#4571)
* add pref for large alt badge * add to settings * do the large badge bit * Tweak wording --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Diffstat (limited to 'src/view/com/util/post-embeds/GifEmbed.tsx')
-rw-r--r-- | src/view/com/util/post-embeds/GifEmbed.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/view/com/util/post-embeds/GifEmbed.tsx b/src/view/com/util/post-embeds/GifEmbed.tsx index f2e2a8b0e..1558b75c6 100644 --- a/src/view/com/util/post-embeds/GifEmbed.tsx +++ b/src/view/com/util/post-embeds/GifEmbed.tsx @@ -8,6 +8,7 @@ import {useLingui} from '@lingui/react' import {HITSLOP_20} from '#/lib/constants' import {parseAltFromGIFDescription} from '#/lib/gif-alt-text' import {isWeb} from '#/platform/detection' +import {useLargeAltBadgeEnabled} from '#/state/preferences/large-alt-badge' import {EmbedPlayerParams} from 'lib/strings/embed-player' import {useAutoplayDisabled} from 'state/preferences' import {atoms as a, useTheme} from '#/alf' @@ -157,6 +158,7 @@ export function GifEmbed({ function AltText({text}: {text: string}) { const control = Prompt.usePromptControl() + const largeAltBadge = useLargeAltBadgeEnabled() const {_} = useLingui() return ( @@ -169,7 +171,9 @@ function AltText({text}: {text: string}) { hitSlop={HITSLOP_20} onPress={control.open} style={styles.altContainer}> - <Text style={styles.alt} accessible={false}> + <Text + style={[styles.alt, largeAltBadge && a.text_xs]} + accessible={false}> <Trans>ALT</Trans> </Text> </TouchableOpacity> |