fix bug with not resetting page reference when reusing headers

This commit is contained in:
Drew Weymouth
2023-07-09 16:52:08 -07:00
parent 203070328c
commit a86a81f1e6
3 changed files with 3 additions and 0 deletions
+1
View File
@@ -80,6 +80,7 @@ func newAlbumPage(
a.ExtendBaseWidget(a)
if h := pool.Obtain(util.WidgetTypeAlbumPageHeader); h != nil {
a.header = h.(*AlbumPageHeader)
a.header.page = a
a.header.Clear()
} else {
a.header = NewAlbumPageHeader(a)
+1
View File
@@ -74,6 +74,7 @@ func newArtistPage(artistID string, cfg *backend.ArtistPageConfig, pool *util.Wi
a.ExtendBaseWidget(a)
if h := a.pool.Obtain(util.WidgetTypeArtistPageHeader); h != nil {
a.header = h.(*ArtistPageHeader)
a.header.artistPage = a
a.header.Clear()
} else {
a.header = NewArtistPageHeader(a)
+1
View File
@@ -69,6 +69,7 @@ func newPlaylistPage(
a.ExtendBaseWidget(a)
if h := a.widgetPool.Obtain(util.WidgetTypePlaylistPageHeader); h != nil {
a.header = h.(*PlaylistPageHeader)
a.header.page = a
a.header.Clear()
} else {
a.header = NewPlaylistPageHeader(a)