(cherry picked from commit 66e3db539d5baa41436c9e49af06e87a78e9e7e1)
This commit is contained in:
Eric Bailey
2025-08-12 18:07:13 -05:00
committed by Samuel Newman
parent 82018c1a1e
commit f7ba617b32
2 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -133,9 +133,9 @@ import {toast} from '#/components/Toast'
import {Text as NewText} from '#/components/Typography'
import {BottomSheetPortalProvider} from '../../../../modules/bottom-sheet'
import {
type Props as SelectMediaButtonProps,
SelectMediaBtn,
} from './SelectMediaBtn'
SelectMediaButton,
type SelectMediaButtonProps,
} from './SelectMediaButton'
import {
type ComposerAction,
composerReducer,
@@ -1368,7 +1368,7 @@ function ComposerFooter({
<VideoUploadToolbar state={video} />
) : (
<ToolbarWrapper style={[a.flex_row, a.align_center, a.gap_xs]}>
<SelectMediaBtn
<SelectMediaButton
size={images.length}
disabled={isMediaSelectionDisabled}
setError={onError}
@@ -24,7 +24,7 @@ import {useSheetWrapper} from '#/components/Dialog/sheet-wrapper'
import {Image_Stroke2_Corner0_Rounded as ImageIcon} from '#/components/icons/Image'
import {toast} from '#/components/Toast'
export type Props = {
export type SelectMediaButtonProps = {
size: number
disabled?: boolean
setError: (error: string) => void
@@ -362,11 +362,11 @@ async function processImagePickerAssets(
}
}
export function SelectMediaBtn({
export function SelectMediaButton({
disabled,
selectedAssetsCount,
onSelectAssets,
}: Props) {
}: SelectMediaButtonProps) {
const {_} = useLingui()
const {requestPhotoAccessIfNeeded} = usePhotoLibraryPermission()
const {requestVideoAccessIfNeeded} = useVideoLibraryPermission()