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:
@@ -1401,7 +1401,7 @@ export const PostDetailScreen: React.FC = () => {
|
||||
{
|
||||
paddingHorizontal: responsivePadding,
|
||||
paddingVertical: responsiveGap,
|
||||
paddingBottom: keyboardHeight + responsiveGap + insets.bottom,
|
||||
paddingBottom: (Platform.OS === 'android' ? keyboardHeight : 0) + responsiveGap + insets.bottom,
|
||||
}
|
||||
]}>
|
||||
{/* 回复提示 */}
|
||||
@@ -1486,6 +1486,8 @@ export const PostDetailScreen: React.FC = () => {
|
||||
minHeight={60}
|
||||
autoExpand
|
||||
style={styles.expandedTextInput}
|
||||
returnKeyType="send"
|
||||
onSubmitEditing={handleSendComment}
|
||||
/>
|
||||
|
||||
{/* Image preview */}
|
||||
|
||||
Reference in New Issue
Block a user