Skip to content

Commit

Permalink
Enable video_upload gate (#5311)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Sep 13, 2024
1 parent 47d99b8 commit fddb125
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/lib/statsig/gates.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export type Gate =
// Keep this alphabetic please.
'debug_show_feedcontext' | 'suggested_feeds_interstitial' | 'video_upload' // upload videos
'debug_show_feedcontext' | 'suggested_feeds_interstitial'
15 changes: 6 additions & 9 deletions src/view/com/composer/Composer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import {useIsKeyboardVisible} from '#/lib/hooks/useIsKeyboardVisible'
import {usePalette} from '#/lib/hooks/usePalette'
import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
import {LikelyType} from '#/lib/link-meta/link-meta'
import {logEvent, useGate} from '#/lib/statsig/statsig'
import {logEvent} from '#/lib/statsig/statsig'
import {cleanError} from '#/lib/strings/errors'
import {insertMentionAt} from '#/lib/strings/mention-manip'
import {shortenLinks} from '#/lib/strings/rich-text-manip'
Expand Down Expand Up @@ -140,7 +140,6 @@ export const ComposePost = observer(function ComposePost({
}: Props & {
cancelRef?: React.RefObject<CancelRef>
}) {
const gate = useGate()
const {currentAccount} = useSession()
const agent = useAgent()
const {data: currentProfile} = useProfileQuery({did: currentAccount!.did})
Expand Down Expand Up @@ -803,13 +802,11 @@ export const ComposePost = observer(function ComposePost({
) : (
<ToolbarWrapper style={[a.flex_row, a.align_center, a.gap_xs]}>
<SelectPhotoBtn gallery={gallery} disabled={!canSelectImages} />
{gate('video_upload') && (
<SelectVideoBtn
onSelectVideo={selectVideo}
disabled={!canSelectImages}
setError={setError}
/>
)}
<SelectVideoBtn
onSelectVideo={selectVideo}
disabled={!canSelectImages}
setError={setError}
/>
<OpenCameraBtn gallery={gallery} disabled={!canSelectImages} />
<SelectGifBtn
onClose={focusTextInput}
Expand Down

0 comments on commit fddb125

Please sign in to comment.