about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2024-09-10 02:02:53 +0100
committerGitHub <noreply@github.com>2024-09-10 02:02:53 +0100
commit0f6be244a6bd4bbeb86b9914e8a5fe58a14b6809 (patch)
tree303970d27a6543ec36219bb4d106ea3778c48321 /src
parent436e30fdedb4fd7a1ad462e5c37f4d6eefe8b4ae (diff)
downloadvoidsky-0f6be244a6bd4bbeb86b9914e8a5fe58a14b6809.tar.zst
max 1 subtitle file (#5244)
Diffstat (limited to 'src')
-rw-r--r--src/view/com/composer/videos/SubtitleDialog.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/view/com/composer/videos/SubtitleDialog.tsx b/src/view/com/composer/videos/SubtitleDialog.tsx
index 009087452..10c2d7564 100644
--- a/src/view/com/composer/videos/SubtitleDialog.tsx
+++ b/src/view/com/composer/videos/SubtitleDialog.tsx
@@ -20,6 +20,8 @@ import {Warning_Stroke2_Corner0_Rounded as WarningIcon} from '#/components/icons
 import {Text} from '#/components/Typography'
 import {SubtitleFilePicker} from './SubtitleFilePicker'
 
+const MAX_NUM_CAPTIONS = 1
+
 interface Props {
   defaultAltText: string
   captions: {lang: string; file: File}[]
@@ -134,7 +136,9 @@ function SubtitleDialogInner({
             </Text>
             <SubtitleFilePicker
               onSelectFile={handleSelectFile}
-              disabled={subtitleMissingLanguage || captions.length >= 4}
+              disabled={
+                subtitleMissingLanguage || captions.length >= MAX_NUM_CAPTIONS
+              }
             />
             <View>
               {captions.map((subtitle, i) => (