fix(compose): Share-Button onPressIn fixes keyboard-tap, native iOS-Style
Diagnose: ComposeCard ist ListHeaderComponent der FlatList die keyboardShouldPersistTaps="handled" hat. Aber das Prop propagiert nicht rekursiv durch tiefere View-Ketten — der Share-Button-Pressable liegt zu tief, der erste Tap dismissed nur die Tastatur. Fix: onPress → onPressIn (fired beim Touch-Down vor Keyboard-Dismiss- Logic). Identisch zum Pattern beim Bild-Icon. Guard if(!content.trim() || posting) repliziert die disabled-Logik die onPress hatte. Style: native iOS Primary-Action-Button-Look: - height 44→50, px-5→px-6 - rounded-full → borderRadius 12 (Rectangle statt Pill) - Nunito_700Bold → 600SemiBold - Plain text "Teilen", kein Icon Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
692abc07e1
commit
6b4ea19521
@ -161,18 +161,20 @@ export function ComposeCard({ onPosted }: Props) {
|
|||||||
<Text className="text-sm text-neutral-400" style={{ fontFamily: 'Nunito_600SemiBold' }}>{t('common.cancel')}</Text>
|
<Text className="text-sm text-neutral-400" style={{ fontFamily: 'Nunito_600SemiBold' }}>{t('common.cancel')}</Text>
|
||||||
</Pressable>
|
</Pressable>
|
||||||
<Pressable
|
<Pressable
|
||||||
onPress={submit}
|
onPressIn={() => { if (!content.trim() || posting) return; submit(); }}
|
||||||
disabled={!content.trim() || posting}
|
disabled={!content.trim() || posting}
|
||||||
className="px-5 rounded-full bg-rebreak-500 items-center justify-center"
|
className="bg-rebreak-500 items-center justify-center"
|
||||||
style={({ pressed }) => ({
|
style={({ pressed }) => ({
|
||||||
height: 44,
|
height: 50,
|
||||||
|
paddingHorizontal: 24,
|
||||||
|
borderRadius: 12,
|
||||||
opacity: pressed || !content.trim() || posting ? 0.5 : 1,
|
opacity: pressed || !content.trim() || posting ? 0.5 : 1,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{posting ? (
|
{posting ? (
|
||||||
<ActivityIndicator size="small" color="#fff" />
|
<ActivityIndicator size="small" color="#fff" />
|
||||||
) : (
|
) : (
|
||||||
<Text className="text-white text-base" style={{ fontFamily: 'Nunito_700Bold' }}>{t('community.share')}</Text>
|
<Text className="text-white text-base" style={{ fontFamily: 'Nunito_600SemiBold' }}>{t('community.share')}</Text>
|
||||||
)}
|
)}
|
||||||
</Pressable>
|
</Pressable>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user