From b632d662253d324fde1197016c15473c7417aa94 Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Mon, 6 Oct 2025 14:30:24 +0900 Subject: [PATCH] [Update] UI: Add disable translation function when config page has opened. --- .../ConfigPageCloseTriggerController.jsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src-ui/app/_app_controllers/ConfigPageCloseTriggerController.jsx b/src-ui/app/_app_controllers/ConfigPageCloseTriggerController.jsx index c04e2a1a..3a39be58 100644 --- a/src-ui/app/_app_controllers/ConfigPageCloseTriggerController.jsx +++ b/src-ui/app/_app_controllers/ConfigPageCloseTriggerController.jsx @@ -15,8 +15,14 @@ import { useStore_MainFunctionsStateMemory } from "@store"; export const ConfigPageCloseTriggerController = () => { const { currentIsOpenedConfigPage } = useIsOpenedConfigPage(); - const { currentMainFunctionsStateMemory, updateMainFunctionsStateMemory} = useStore_MainFunctionsStateMemory(); const { + currentMainFunctionsStateMemory, + updateMainFunctionsStateMemory, + } = useStore_MainFunctionsStateMemory(); + + const { + currentTranslationStatus, + setTranslation, currentTranscriptionSendStatus, setTranscriptionSend, currentTranscriptionReceiveStatus, @@ -34,12 +40,14 @@ export const ConfigPageCloseTriggerController = () => { const memorizeLatestMainFunctionsState = () => { updateMainFunctionsStateMemory({ + translation: currentTranslationStatus.data, transcription_send: currentTranscriptionSendStatus.data, transcription_receive: currentTranscriptionReceiveStatus.data, }); }; const restoreMainFunctionState = () => { + if (currentMainFunctionsStateMemory.data.translation === true) setTranslation(true); if (currentMainFunctionsStateMemory.data.transcription_send === true) setTranscriptionSend(true); if (currentMainFunctionsStateMemory.data.transcription_receive === true) setTranscriptionReceive(true); }; @@ -48,6 +56,7 @@ export const ConfigPageCloseTriggerController = () => { if (currentIsOpenedConfigPage.data === true) { // When config page is opened. memorizeLatestMainFunctionsState(); unregisterAll(); + if (currentTranslationStatus.data === true) setTranslation(false); if (currentTranscriptionSendStatus.data === true) setTranscriptionSend(false); if (currentTranscriptionReceiveStatus.data === true) setTranscriptionReceive(false); } else if (currentIsOpenedConfigPage.data === false) { // When config page is closed.