fix race condition with async image fetches
This commit is contained in:
+8
-1
@@ -1,6 +1,7 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"context"
|
||||
"image"
|
||||
"log"
|
||||
|
||||
@@ -39,9 +40,15 @@ type AlbumCard struct {
|
||||
albumID string
|
||||
title *widget.Label
|
||||
artist *widget.Label
|
||||
Cover *TappableImage
|
||||
container *fyne.Container
|
||||
|
||||
// updated by AlbumGrid
|
||||
Cover *TappableImage
|
||||
|
||||
// these fields are used by AlbumGrid to track async update tasks
|
||||
PrevAlbumID string
|
||||
ImgLoadCancel context.CancelFunc
|
||||
|
||||
OnTapped func()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user