fix(ui): adjust keyboard handling and prevent duplicate view recording
- Fix keyboard avoidance logic in PostDetailScreen and ChatScreen by applying manual keyboard height offsets only on Android, preventing double padding on iOS. - Prevent multiple view recording calls in TradeDetailScreen by using a ref to track if the view has already been recorded.
This commit is contained in:
@@ -545,7 +545,8 @@ export const ChatScreen: React.FC<ChatScreenProps> = (props) => {
|
||||
</View>
|
||||
|
||||
{/* 底部区域:输入框 + 面板 */}
|
||||
<View style={{ marginBottom: keyboardHeight > 0 ? keyboardHeight : 0 }}>
|
||||
{/* iOS 由外层 KeyboardAvoidingView(behavior=padding) 处理键盘避让;Android 需要手动推起 */}
|
||||
<View style={{ marginBottom: Platform.OS === 'android' && keyboardHeight > 0 ? keyboardHeight : 0 }}>
|
||||
{/* 输入框区域 */}
|
||||
<View
|
||||
style={[inputWrapperStyle, insets.bottom > 0 && { paddingBottom: insets.bottom }]}
|
||||
|
||||
Reference in New Issue
Block a user