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