Fix webkit reload (#534)

* wrap WKWebView in UnsafePointer

* formatting

* more formatting
This commit is contained in:
Brendan Allan
2023-01-20 00:25:12 -08:00
committed by GitHub
parent 0be71dc955
commit 24de617b92
3 changed files with 4 additions and 3 deletions

View File

@@ -1,7 +1,8 @@
import WebKit
@_cdecl("reload_webview")
public func reloadWebview(webview: WKWebView) -> () {
public func reloadWebview(webviewPtr: UnsafePointer<WKWebView>) -> () {
let webview = webviewPtr.pointee;
webview.window!.orderOut(webview);
webview.reload();
webview.window!.makeKey();

View File

@@ -67,7 +67,7 @@ interface DatabaseViewProps {
const TABS = ['File Paths', 'Objects', 'Tags', 'Operations'];
function DatabaseView(props: DatabaseViewProps) {
const [currentTab, setCurrentTab] = useState<typeof TABS[number]>('Operations');
const [currentTab, setCurrentTab] = useState<(typeof TABS)[number]>('Operations');
const pullOperations = rspc.useMutation('pullOperations');

View File

@@ -89,6 +89,6 @@ const columns = ensureIsColumns([
{ column: 'Type', key: 'extension', width: 100 } as const
]);
type ColumnKey = typeof columns[number]['key'];
type ColumnKey = (typeof columns)[number]['key'];
export default FileRow;