Skip to content

Commit

Permalink
don't call window show
Browse files Browse the repository at this point in the history
  • Loading branch information
thewh1teagle committed Aug 26, 2024
1 parent 43cad44 commit efe7efd
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions desktop/src/pages/home/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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 (
<Layout>
Expand Down

0 comments on commit efe7efd

Please sign in to comment.