[Video] Split 'videos' gate in two (#5037)

zio/stable
Samuel Newman 2024-08-30 20:53:27 +01:00 committed by GitHub
parent ab260c3599
commit c41f372b3c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 5 deletions

View File

@ -5,5 +5,6 @@ export type Gate =
| 'onboarding_minimum_interests' | 'onboarding_minimum_interests'
| 'suggested_feeds_interstitial' | 'suggested_feeds_interstitial'
| 'show_follow_suggestions_in_profile' | 'show_follow_suggestions_in_profile'
| 'video_debug' | 'video_debug' // not recommended
| 'videos' | 'video_upload' // upload videos
| 'video_view_on_posts' // see posted videos

View File

@ -760,7 +760,7 @@ export const ComposePost = observer(function ComposePost({
) : ( ) : (
<ToolbarWrapper style={[a.flex_row, a.align_center, a.gap_xs]}> <ToolbarWrapper style={[a.flex_row, a.align_center, a.gap_xs]}>
<SelectPhotoBtn gallery={gallery} disabled={!canSelectImages} /> <SelectPhotoBtn gallery={gallery} disabled={!canSelectImages} />
{gate('videos') && ( {gate('video_upload') && (
<SelectVideoBtn <SelectVideoBtn
onSelectVideo={selectVideo} onSelectVideo={selectVideo}
disabled={!canSelectImages} disabled={!canSelectImages}

View File

@ -31,7 +31,7 @@ export function VideoEmbed({embed}: {embed: AppBskyEmbedVideo.View}) {
) )
const gate = useGate() const gate = useGate()
if (!gate('videos')) { if (!gate('video_view_on_posts')) {
return null return null
} }

View File

@ -47,7 +47,7 @@ export function VideoEmbed({embed}: {embed: AppBskyEmbedVideo.View}) {
[key], [key],
) )
if (!gate('videos')) { if (!gate('video_view_on_posts')) {
return null return null
} }