Skip to content

Commit 7a5349d

Browse files
committed
fix(window): guard Wails resize flag initialization
1 parent c08484e commit 7a5349d

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

frontend/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
name="viewport"
99
/>
1010
<title>LeviLauncher</title>
11+
<script>
12+
window._wails = window._wails || {};
13+
window._wails.flags = window._wails.flags || {};
14+
</script>
1115
</head>
1216

1317
<body>

main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,9 @@ func main() {
381381
windows.OnWindowEvent(events.Common.WindowRestore, func(_ *application.WindowEvent) {
382382
syncWindowResizeHandles()
383383
})
384-
syncWindowResizeHandles()
384+
windows.OnWindowEvent(events.Windows.WebViewNavigationCompleted, func(_ *application.WindowEvent) {
385+
syncWindowResizeHandles()
386+
})
385387
windows.RegisterHook(events.Common.WindowClosing, func(event *application.WindowEvent) {
386388
w := windows.Width()
387389
h := windows.Height()

0 commit comments

Comments
 (0)