From 7caa0142003a3cc23c7063dd7f46fa51e895400a Mon Sep 17 00:00:00 2001 From: Pierre Ferran Date: Wed, 1 May 2024 17:23:28 -0400 Subject: [PATCH] Reset vu meter on end mic test --- package-lock.json | 2 +- src/app/components/settings-modal/settings-modal.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index cfab173..6490b47 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15698,7 +15698,7 @@ "node_modules/trackaudio-afv": { "version": "1.0.0", "resolved": "file:backend/trackaudio-afv-1.0.0.tgz", - "integrity": "sha512-R693+UqVp5zLNN7vk+akVP+DzBsNHzjg4juft/Mw9Jj0WaVlUGEL90KFiDjjkjrVVbuQ2dW71W0d7DqAPK5pyA==", + "integrity": "sha512-yXJAHxwjHh4Vcmv7HtfwV0B4PF761AdrNc2xK3wQeqZa45uKwe1K8NyJB7+lIzvLpmW9PCzNMljXR9jw5f3Yew==", "dependencies": { "bindings": "^1.5.0", "node-addon-api": "^1.1.0" diff --git a/src/app/components/settings-modal/settings-modal.tsx b/src/app/components/settings-modal/settings-modal.tsx index 49c4c67..a9338d2 100644 --- a/src/app/components/settings-modal/settings-modal.tsx +++ b/src/app/components/settings-modal/settings-modal.tsx @@ -42,7 +42,7 @@ const SettingsModal: React.FC = ({ closeModal }) => { const [cid, setCid] = useState(""); const [password, setPassword] = useState(""); - const [vu, vuPeak] = useUtilStore((state) => [state.vu, state.peakVu]); + const [vu, vuPeak, updateVu] = useUtilStore((state) => [state.vu, state.peakVu, state.updateVu]); const [isMicTesting, setIsMicTesting] = useState(false); useEffect(() => { @@ -172,6 +172,7 @@ const SettingsModal: React.FC = ({ closeModal }) => { if (isMicTesting) { void window.api.StopMicTest(); setIsMicTesting(false); + updateVu(0, 0); return; } setIsMicTesting(true);