Skip to content

Commit

Permalink
Make sure to not also grow cleanups to infinity
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed Jan 23, 2025
1 parent 7975fc4 commit df6e249
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/fyne_demo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,13 @@ func makeNav(setTutorial func(tutorial tutorials.Tutorial), loadPrevious bool) f
},
OnSelected: func(uid string) {
if t, ok := tutorials.Tutorials[uid]; ok {
a.Preferences().SetString(preferenceCurrentTutorial, uid)
setTutorial(t)

for _, f := range tutorials.OnChangeFuncs {
f(uid)
}
tutorials.OnChangeFuncs = nil // Loading a page registers a new cleanup.

a.Preferences().SetString(preferenceCurrentTutorial, uid)
setTutorial(t)
}
},
}
Expand Down

0 comments on commit df6e249

Please sign in to comment.