From f18c50fef04882dfc24ec2aa413dc8129855f800 Mon Sep 17 00:00:00 2001 From: Jacalz Date: Fri, 9 Aug 2024 13:05:15 +0200 Subject: [PATCH] Remove unnecessary init function --- app/app_xdg.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/app_xdg.go b/app/app_xdg.go index e04bd10cd1..a436b8c50c 100644 --- a/app/app_xdg.go +++ b/app/app_xdg.go @@ -21,10 +21,6 @@ import ( "fyne.io/fyne/v2/theme" ) -func init() { - internalapp.CurrentVariant.Store(uint64(findFreedesktopColorScheme())) -} - func (a *fyneApp) OpenURL(url *url.URL) error { if build.IsFlatpak { err := openuri.OpenURI("", url.String(), nil) @@ -124,6 +120,8 @@ func rootConfigDir() string { } func watchTheme() { + internalapp.CurrentVariant.Store(uint64(findFreedesktopColorScheme())) + go portalSettings.OnSignalSettingChanged(func(changed portalSettings.Changed) { if changed.Namespace == "org.freedesktop.appearance" && changed.Key == "color-scheme" { themeVariant := colorSchemeToThemeVariant(appearance.ColorScheme(changed.Value.(uint32)))