Skip to content

Commit

Permalink
Remove unnecessary init function
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed Aug 9, 2024
1 parent 6f6f098 commit f18c50f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/app_xdg.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)))
Expand Down

0 comments on commit f18c50f

Please sign in to comment.