Merge branch 'ui' into develop
This commit is contained in:
@@ -23,10 +23,13 @@ export const ConfigPageCloseTriggerController = () => {
|
|||||||
const {
|
const {
|
||||||
currentTranslationStatus,
|
currentTranslationStatus,
|
||||||
setTranslation,
|
setTranslation,
|
||||||
|
pendingTranslationStatus,
|
||||||
currentTranscriptionSendStatus,
|
currentTranscriptionSendStatus,
|
||||||
setTranscriptionSend,
|
setTranscriptionSend,
|
||||||
|
pendingTranscriptionSendStatus,
|
||||||
currentTranscriptionReceiveStatus,
|
currentTranscriptionReceiveStatus,
|
||||||
setTranscriptionReceive,
|
setTranscriptionReceive,
|
||||||
|
pendingTranscriptionReceiveStatus,
|
||||||
} = useMainFunction();
|
} = useMainFunction();
|
||||||
const {
|
const {
|
||||||
currentMicThresholdCheckStatus,
|
currentMicThresholdCheckStatus,
|
||||||
@@ -47,6 +50,12 @@ export const ConfigPageCloseTriggerController = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const restoreMainFunctionState = () => {
|
const restoreMainFunctionState = () => {
|
||||||
|
// First, set loading status all before waiting a backend process.
|
||||||
|
if (currentMainFunctionsStateMemory.data.translation === true) pendingTranslationStatus();
|
||||||
|
if (currentMainFunctionsStateMemory.data.transcription_send === true) pendingTranscriptionSendStatus();
|
||||||
|
if (currentMainFunctionsStateMemory.data.transcription_receive === true) pendingTranscriptionReceiveStatus();
|
||||||
|
|
||||||
|
// Then, restore them.
|
||||||
if (currentMainFunctionsStateMemory.data.translation === true) setTranslation(true);
|
if (currentMainFunctionsStateMemory.data.translation === true) setTranslation(true);
|
||||||
if (currentMainFunctionsStateMemory.data.transcription_send === true) setTranscriptionSend(true);
|
if (currentMainFunctionsStateMemory.data.transcription_send === true) setTranscriptionSend(true);
|
||||||
if (currentMainFunctionsStateMemory.data.transcription_receive === true) setTranscriptionReceive(true);
|
if (currentMainFunctionsStateMemory.data.transcription_receive === true) setTranscriptionReceive(true);
|
||||||
|
|||||||
@@ -87,16 +87,19 @@ export const useMainFunction = () => {
|
|||||||
toggleTranslation,
|
toggleTranslation,
|
||||||
updateTranslationStatus,
|
updateTranslationStatus,
|
||||||
setTranslation,
|
setTranslation,
|
||||||
|
pendingTranslationStatus, // Exception.(It shouldn't be used in other function, normally.)
|
||||||
|
|
||||||
currentTranscriptionSendStatus,
|
currentTranscriptionSendStatus,
|
||||||
toggleTranscriptionSend,
|
toggleTranscriptionSend,
|
||||||
updateTranscriptionSendStatus,
|
updateTranscriptionSendStatus,
|
||||||
setTranscriptionSend,
|
setTranscriptionSend,
|
||||||
|
pendingTranscriptionSendStatus, // Exception.(It shouldn't be used in other function, normally.)
|
||||||
|
|
||||||
currentTranscriptionReceiveStatus,
|
currentTranscriptionReceiveStatus,
|
||||||
toggleTranscriptionReceive,
|
toggleTranscriptionReceive,
|
||||||
updateTranscriptionReceiveStatus,
|
updateTranscriptionReceiveStatus,
|
||||||
setTranscriptionReceive,
|
setTranscriptionReceive,
|
||||||
|
pendingTranscriptionReceiveStatus, // Exception.(It shouldn't be used in other function, normally.)
|
||||||
|
|
||||||
currentForegroundStatus,
|
currentForegroundStatus,
|
||||||
toggleForeground,
|
toggleForeground,
|
||||||
|
|||||||
Reference in New Issue
Block a user