mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-20 00:23:58 +01:00
Upgrade to Tauri 2.0 (#23)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { appWindow } from '@tauri-apps/api/window';
|
||||
import { getCurrent } from '@tauri-apps/api/webviewWindow';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
export function useWindowFocus() {
|
||||
@@ -6,7 +6,7 @@ export function useWindowFocus() {
|
||||
|
||||
useEffect(() => {
|
||||
let unsub: undefined | (() => void) = undefined;
|
||||
appWindow
|
||||
getCurrent()
|
||||
.onFocusChanged((e) => {
|
||||
setVisible(e.payload);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user