fix(medication): 统一处理名字编辑弹窗和备注弹窗的键盘监听逻辑
This commit is contained in:
@@ -320,7 +320,8 @@ export default function MedicationDetailScreen() {
|
||||
}, [appendDictationResult, isDictationSupported, noteModalVisible]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!noteModalVisible) {
|
||||
// 统一处理名字编辑弹窗和备注弹窗的键盘监听
|
||||
if (!noteModalVisible && !nameModalVisible) {
|
||||
setKeyboardHeight(0);
|
||||
return;
|
||||
}
|
||||
@@ -341,7 +342,7 @@ export default function MedicationDetailScreen() {
|
||||
showSub.remove();
|
||||
hideSub.remove();
|
||||
};
|
||||
}, [noteModalVisible]);
|
||||
}, [noteModalVisible, nameModalVisible]);
|
||||
|
||||
const handleDictationPress = useCallback(async () => {
|
||||
if (!isDictationSupported || dictationLoading) {
|
||||
|
||||
Reference in New Issue
Block a user