Skip to content

Commit

Permalink
Reset vu meter on end mic test
Browse files Browse the repository at this point in the history
  • Loading branch information
pierr3 committed May 1, 2024
1 parent e8735e0 commit 7caa014
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/app/components/settings-modal/settings-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const SettingsModal: React.FC<SettingsModalProps> = ({ 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(() => {
Expand Down Expand Up @@ -172,6 +172,7 @@ const SettingsModal: React.FC<SettingsModalProps> = ({ closeModal }) => {
if (isMicTesting) {
void window.api.StopMicTest();
setIsMicTesting(false);
updateVu(0, 0);
return;
}
setIsMicTesting(true);
Expand Down

0 comments on commit 7caa014

Please sign in to comment.