update fyne version

This commit is contained in:
aynakeya
2025-09-28 22:59:08 +08:00
parent f6f306edc3
commit 82662c308a
6 changed files with 23 additions and 84 deletions

View File

@@ -2,20 +2,20 @@ package gutil
import (
"AynaLivePlayer/pkg/event"
"fyne.io/fyne/v2"
)
// since 2.6.1, calls to fyne API from other go routine must be wrapped in fyne.Do
func ThreadSafeHandler(fn func(e *event.Event)) func(e *event.Event) {
return fn
// todo: uncomment this after 2.6.x become stable
//return func(e *event.Event) {
// fyne.Do(func() {
// fn(e)
// })
//}
//return fn
return func(e *event.Event) {
fyne.Do(func() {
fn(e)
})
}
}
func RunInFyneThread(fn func()) {
fn()
//fyne.Do(fn)
//fn()
fyne.Do(fn)
}