Enable 300mb video uploads (#10497)
This commit is contained in:
@@ -222,6 +222,10 @@ export const ComposePost = ({
|
||||
const [publishingStage, setPublishingStage] = useState('')
|
||||
const [error, setError] = useState('')
|
||||
|
||||
const enableLargeVideoUploads = ax.features.enabled(
|
||||
ax.features.LargeVideoUploads,
|
||||
)
|
||||
|
||||
/**
|
||||
* Track when a draft was created so we can measure draft age in metrics.
|
||||
* Set when a draft is loaded via handleSelectDraft.
|
||||
@@ -344,9 +348,10 @@ export const ComposePost = ({
|
||||
currentDid,
|
||||
abortController.signal,
|
||||
i18n,
|
||||
enableLargeVideoUploads,
|
||||
)
|
||||
},
|
||||
[i18n, agent, currentDid, composerDispatch],
|
||||
[i18n, agent, currentDid, composerDispatch, enableLargeVideoUploads],
|
||||
)
|
||||
|
||||
const onInitVideo = useNonReactiveCallback(() => {
|
||||
@@ -491,6 +496,7 @@ export const ComposePost = ({
|
||||
currentDid,
|
||||
abortController.signal,
|
||||
i18n,
|
||||
enableLargeVideoUploads,
|
||||
)
|
||||
} catch (e) {
|
||||
logger.error('Failed to restore video from draft', {
|
||||
@@ -499,7 +505,7 @@ export const ComposePost = ({
|
||||
})
|
||||
}
|
||||
},
|
||||
[i18n, agent, currentDid, composerDispatch],
|
||||
[i18n, agent, currentDid, composerDispatch, enableLargeVideoUploads],
|
||||
)
|
||||
|
||||
const handleSelectDraft = useCallback(
|
||||
@@ -810,7 +816,7 @@ export const ComposePost = ({
|
||||
)),
|
||||
)
|
||||
|
||||
const getFilteredThread = (): {
|
||||
const getFilteredThread = useCallback((): {
|
||||
type: 'none' | 'trailing-only' | 'non-trailing'
|
||||
filteredThread: ThreadDraft
|
||||
} => {
|
||||
@@ -838,7 +844,7 @@ export const ComposePost = ({
|
||||
type: hasNonTrailingEmpty ? 'non-trailing' : 'trailing-only',
|
||||
filteredThread,
|
||||
}
|
||||
}
|
||||
}, [thread])
|
||||
|
||||
const onPressPublish = useCallback(async () => {
|
||||
if (isPublishing) {
|
||||
@@ -1011,7 +1017,7 @@ export const ComposePost = ({
|
||||
setLangPrefs.savePostLanguageToHistory()
|
||||
if (initQuote) {
|
||||
// We want to wait for the quote count to update before we call `onPost`, which will refetch data
|
||||
whenAppViewReady(agent, initQuote.uri, res => {
|
||||
void whenAppViewReady(agent, initQuote.uri, res => {
|
||||
const anchor = res.data.thread.at(0)
|
||||
if (
|
||||
AppBskyUnspeccedDefs.isThreadItemPost(anchor?.value) &&
|
||||
@@ -1059,7 +1065,6 @@ export const ComposePost = ({
|
||||
l,
|
||||
ax,
|
||||
agent,
|
||||
thread,
|
||||
canPost,
|
||||
isPublishing,
|
||||
currentLanguages,
|
||||
@@ -1077,6 +1082,7 @@ export const ComposePost = ({
|
||||
cleanupPublishedDraft,
|
||||
loadedDraftCreatedAt,
|
||||
emptyPostsPromptControl,
|
||||
getFilteredThread,
|
||||
])
|
||||
|
||||
const handleConfirmSkipEmpty = () => {
|
||||
|
||||
Reference in New Issue
Block a user