migrate to Fyne 2.6 - WIP - updates for new threading model

This commit is contained in:
Drew Weymouth
2025-02-08 08:34:39 -03:00
parent 3dcf8aa9d7
commit c60727f92a
13 changed files with 262 additions and 195 deletions
+3 -1
View File
@@ -4,6 +4,8 @@ import (
"context"
"image"
"log"
"fyne.io/fyne/v2"
)
// ThumbnailLoader is a utility type that exposes a single API to load
@@ -50,7 +52,7 @@ func (i *ThumbnailLoader) Load(coverID string) {
if err != nil {
log.Printf("Error loading cover image: %s", err.Error())
} else {
i.callOnLoaded(img)
fyne.Do(func() { i.callOnLoaded(img) })
}
i.prevLoadCancel() // Done. Release resources associated with un-cancelled ctx
})