[Refactor] Change state management structures. Async atom to be manage manually.
This commit is contained in:
@@ -3,10 +3,10 @@ import { useStdoutToPython } from "@logics/useStdoutToPython";
|
||||
|
||||
export const useMicDeviceList = () => {
|
||||
const { asyncStdoutToPython } = useStdoutToPython();
|
||||
const { currentMicDeviceList, updateMicDeviceList } = useStore_MicDeviceList();
|
||||
const { currentMicDeviceList, updateMicDeviceList, pendingMicDeviceList } = useStore_MicDeviceList();
|
||||
|
||||
const getMicDeviceList = () => {
|
||||
updateMicDeviceList(() => new Promise(() => {}));
|
||||
pendingMicDeviceList();
|
||||
asyncStdoutToPython("/get/list_mic_device");
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user