allow only posting video (#5142)
parent
c36c47d49a
commit
e8eaf2f4a7
|
@ -224,7 +224,12 @@ export const ComposePost = observer(function ComposePost({
|
||||||
)
|
)
|
||||||
|
|
||||||
const onPressCancel = useCallback(() => {
|
const onPressCancel = useCallback(() => {
|
||||||
if (graphemeLength > 0 || !gallery.isEmpty || extGif) {
|
if (
|
||||||
|
graphemeLength > 0 ||
|
||||||
|
!gallery.isEmpty ||
|
||||||
|
extGif ||
|
||||||
|
videoUploadState.status !== 'idle'
|
||||||
|
) {
|
||||||
closeAllDialogs()
|
closeAllDialogs()
|
||||||
Keyboard.dismiss()
|
Keyboard.dismiss()
|
||||||
discardPromptControl.open()
|
discardPromptControl.open()
|
||||||
|
@ -238,6 +243,7 @@ export const ComposePost = observer(function ComposePost({
|
||||||
closeAllDialogs,
|
closeAllDialogs,
|
||||||
discardPromptControl,
|
discardPromptControl,
|
||||||
onClose,
|
onClose,
|
||||||
|
videoUploadState.status,
|
||||||
])
|
])
|
||||||
|
|
||||||
useImperativeHandle(cancelRef, () => ({onPressCancel}))
|
useImperativeHandle(cancelRef, () => ({onPressCancel}))
|
||||||
|
@ -332,7 +338,8 @@ export const ComposePost = observer(function ComposePost({
|
||||||
richtext.text.trim().length === 0 &&
|
richtext.text.trim().length === 0 &&
|
||||||
gallery.isEmpty &&
|
gallery.isEmpty &&
|
||||||
!extLink &&
|
!extLink &&
|
||||||
!quote
|
!quote &&
|
||||||
|
videoUploadState.status === 'idle'
|
||||||
) {
|
) {
|
||||||
setError(_(msg`Did you want to say anything?`))
|
setError(_(msg`Did you want to say anything?`))
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue