layout animation config for composer footer

This commit is contained in:
Samuel Newman
2025-04-28 16:41:59 +03:00
parent d0086da4e3
commit 8e7a150cd0
+35 -33
View File
@@ -1266,39 +1266,41 @@ function ComposerFooter({
a.justify_between, a.justify_between,
]}> ]}>
<View style={[a.flex_row, a.align_center]}> <View style={[a.flex_row, a.align_center]}>
{video && video.status !== 'done' ? ( <LayoutAnimationConfig skipEntering skipExiting>
<VideoUploadToolbar state={video} /> {video && video.status !== 'done' ? (
) : ( <VideoUploadToolbar state={video} />
<ToolbarWrapper style={[a.flex_row, a.align_center, a.gap_xs]}> ) : (
<SelectPhotoBtn <ToolbarWrapper style={[a.flex_row, a.align_center, a.gap_xs]}>
size={images.length} <SelectPhotoBtn
disabled={media?.type === 'images' ? isMaxImages : !!media} size={images.length}
onAdd={onImageAdd} disabled={media?.type === 'images' ? isMaxImages : !!media}
/> onAdd={onImageAdd}
<SelectVideoBtn />
onSelectVideo={asset => onSelectVideo(post.id, asset)} <SelectVideoBtn
disabled={!!media} onSelectVideo={asset => onSelectVideo(post.id, asset)}
setError={onError} disabled={!!media}
/> setError={onError}
<OpenCameraBtn />
disabled={media?.type === 'images' ? isMaxImages : !!media} <OpenCameraBtn
onAdd={onImageAdd} disabled={media?.type === 'images' ? isMaxImages : !!media}
/> onAdd={onImageAdd}
<SelectGifBtn onSelectGif={onSelectGif} disabled={!!media} /> />
{!isMobile ? ( <SelectGifBtn onSelectGif={onSelectGif} disabled={!!media} />
<Button {!isMobile ? (
onPress={onEmojiButtonPress} <Button
style={a.p_sm} onPress={onEmojiButtonPress}
label={_(msg`Open emoji picker`)} style={a.p_sm}
accessibilityHint={_(msg`Opens emoji picker`)} label={_(msg`Open emoji picker`)}
variant="ghost" accessibilityHint={_(msg`Opens emoji picker`)}
shape="round" variant="ghost"
color="primary"> shape="round"
<EmojiSmile size="lg" /> color="primary">
</Button> <EmojiSmile size="lg" />
) : null} </Button>
</ToolbarWrapper> ) : null}
)} </ToolbarWrapper>
)}
</LayoutAnimationConfig>
</View> </View>
<View style={[a.flex_row, a.align_center, a.justify_between]}> <View style={[a.flex_row, a.align_center, a.justify_between]}>
{showAddButton && ( {showAddButton && (