From efe7efd5693052ad76c5688d0234edba3d8a702d Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Mon, 26 Aug 2024 16:14:54 +0300 Subject: [PATCH] don't call window show --- desktop/src/pages/home/Page.tsx | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/desktop/src/pages/home/Page.tsx b/desktop/src/pages/home/Page.tsx index c97476ee..fc67cf6e 100644 --- a/desktop/src/pages/home/Page.tsx +++ b/desktop/src/pages/home/Page.tsx @@ -8,8 +8,6 @@ import AudioInput from '~/pages/home/AudioInput' import AudioPlayer from './AudioPlayer' import ProgressPanel from './ProgressPanel' import { viewModel } from './viewModel' -import { useEffect } from 'react' -import * as webviewWindow from '@tauri-apps/api/webviewWindow' import AudioDeviceInput from '~/components/AudioDeviceInput' import { ReactComponent as FileIcon } from '~/icons/file.svg' import { ReactComponent as MicrphoneIcon } from '~/icons/microphone.svg' @@ -18,17 +16,17 @@ export default function Home() { const { t } = useTranslation() const vm = viewModel() - async function showWindow() { - const currentWindow = webviewWindow.getCurrentWebviewWindow() - await currentWindow.show() - if (import.meta.env.PROD) { - await currentWindow.setFocus() - } - } + // async function showWindow() { + // const currentWindow = webviewWindow.getCurrentWebviewWindow() + // await currentWindow.show() + // if (import.meta.env.PROD) { + // await currentWindow.setFocus() + // } + // } - useEffect(() => { - showWindow() - }, []) + // useEffect(() => { + // showWindow() + // }, []) return (