[Update/Perf] Config Page: Device Tab. Add threshold_component(dev).
Improve re-render, unnecessary, problem.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { useMainFunction } from "./useMainFunction";
|
||||
import { useConfig } from "./useConfig";
|
||||
import { useMessage } from "./useMessage";
|
||||
import { useVolume } from "./useVolume";
|
||||
|
||||
export const useReceiveRoutes = () => {
|
||||
const {
|
||||
@@ -25,9 +26,10 @@ export const useReceiveRoutes = () => {
|
||||
|
||||
updateSpeakerDeviceList,
|
||||
updateSelectedSpeakerDevice,
|
||||
|
||||
} = useConfig();
|
||||
|
||||
const { updateVolumeVariable_Mic } = useVolume();
|
||||
|
||||
const routes = {
|
||||
"/controller/callback_enable_translation": updateTranslationStatus,
|
||||
"/controller/callback_disable_translation": updateTranslationStatus,
|
||||
@@ -51,6 +53,8 @@ export const useReceiveRoutes = () => {
|
||||
"/config/choice_speaker_device": updateSelectedSpeakerDevice,
|
||||
"/controller/callback_set_speaker_device": updateSelectedSpeakerDevice,
|
||||
|
||||
"/action/check_mic_threshold_energy": updateVolumeVariable_Mic,
|
||||
|
||||
|
||||
"/controller/callback_messagebox_send": updateSentMessageLog,
|
||||
"/action/transcription_send_mic_message": addSentMessageLog,
|
||||
|
||||
Reference in New Issue
Block a user