From 524411964faad21bf57f927da867ae6e2aef797a Mon Sep 17 00:00:00 2001 From: stffabi Date: Fri, 22 Apr 2022 23:09:53 +0200 Subject: [PATCH] [v2] WindowReloadApp should use the startURL of the frontend to support reloading when a frontend dev server is used (#1347) --- v2/internal/frontend/desktop/darwin/frontend.go | 2 +- v2/internal/frontend/desktop/linux/frontend.go | 2 +- v2/internal/frontend/desktop/windows/frontend.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/v2/internal/frontend/desktop/darwin/frontend.go b/v2/internal/frontend/desktop/darwin/frontend.go index c26133d36..1d0dbb75d 100644 --- a/v2/internal/frontend/desktop/darwin/frontend.go +++ b/v2/internal/frontend/desktop/darwin/frontend.go @@ -116,7 +116,7 @@ func (f *Frontend) WindowReload() { } func (f *Frontend) WindowReloadApp() { - f.ExecJS(fmt.Sprintf("window.location.href = '%s';", startURL)) + f.ExecJS(fmt.Sprintf("window.location.href = '%s';", f.startURL)) } func (f *Frontend) WindowSetSystemDefaultTheme() { diff --git a/v2/internal/frontend/desktop/linux/frontend.go b/v2/internal/frontend/desktop/linux/frontend.go index e034d1d58..4d045c00e 100644 --- a/v2/internal/frontend/desktop/linux/frontend.go +++ b/v2/internal/frontend/desktop/linux/frontend.go @@ -172,7 +172,7 @@ func (f *Frontend) WindowUnfullscreen() { } func (f *Frontend) WindowReloadApp() { - f.ExecJS(fmt.Sprintf("window.location.href = '%s';", startURL)) + f.ExecJS(fmt.Sprintf("window.location.href = '%s';", f.startURL)) } func (f *Frontend) WindowShow() { diff --git a/v2/internal/frontend/desktop/windows/frontend.go b/v2/internal/frontend/desktop/windows/frontend.go index ecd979e31..c2a5716cf 100644 --- a/v2/internal/frontend/desktop/windows/frontend.go +++ b/v2/internal/frontend/desktop/windows/frontend.go @@ -212,7 +212,7 @@ func (f *Frontend) WindowFullscreen() { } func (f *Frontend) WindowReloadApp() { - f.ExecJS(fmt.Sprintf("window.location.href = '%s';", startURL)) + f.ExecJS(fmt.Sprintf("window.location.href = '%s';", f.startURL)) } func (f *Frontend) WindowUnfullscreen() {