Conditionally render labels button when media exists in post (#5942)

* conditionally render button

* update labels on remove

* tweak
This commit is contained in:
Hailey
2024-10-25 14:52:37 -07:00
committed by GitHub
parent d520dd95b9
commit e05b4a910f
3 changed files with 120 additions and 139 deletions
+8 -7
View File
@@ -896,13 +896,14 @@ function ComposerPills({
style={bottomBarAnimatedStyle}
/>
)}
<LabelsBtn
labels={draft.labels}
onChange={nextLabels => {
dispatch({type: 'update_labels', labels: nextLabels})
}}
hasMedia={hasMedia || hasLink}
/>
{hasMedia || hasLink ? (
<LabelsBtn
labels={draft.labels}
onChange={nextLabels => {
dispatch({type: 'update_labels', labels: nextLabels})
}}
/>
) : null}
</ScrollView>
</Animated.View>
)