Run gofumpt on the project

This commit is contained in:
Jacalz
2025-09-17 22:30:49 +02:00
parent 534a7bfaaf
commit 08f335da44
41 changed files with 92 additions and 84 deletions
+1 -1
View File
@@ -486,7 +486,7 @@ type ArtistPageHeader struct {
menuBtn *widget.Button
container *fyne.Container
fullSizeCoverFetching bool
//shareMenuItem *fyne.MenuItem
// shareMenuItem *fyne.MenuItem
}
func NewArtistPageHeader(page *ArtistPage) *ArtistPageHeader {
+3 -2
View File
@@ -204,7 +204,8 @@ func NewGenreList(sorting widgets.ListHeaderSort) *GenreList {
a.hdr = widgets.NewListHeader([]widgets.ListColumn{
{Text: lang.L("Name"), Alignment: fyne.TextAlignLeading, CanToggleVisible: false},
{Text: albumCount, Alignment: fyne.TextAlignTrailing, CanToggleVisible: false},
{Text: trackCount, Alignment: fyne.TextAlignTrailing, CanToggleVisible: false}},
{Text: trackCount, Alignment: fyne.TextAlignTrailing, CanToggleVisible: false},
},
a.columnsLayout)
a.hdr.SetSorting(sorting)
a.hdr.OnColumnSortChanged = a.onSorted
@@ -261,7 +262,7 @@ func (g *GenreList) doSortGenres() {
return
}
switch g.sorting.ColNumber {
case 0: //Name
case 0: // Name
g.stringSort(func(g *mediaprovider.Genre) string { return g.Name })
case 1: // Album Count
g.intSort(func(g *mediaprovider.Genre) int { return g.AlbumCount })
+4 -3
View File
@@ -360,8 +360,10 @@ func (a *NowPlayingPage) updateLyrics() {
// set the widget to an empty (not nil) lyric during fetch
// to keep it from showing "Lyrics not available"
a.lyricsViewer.DisableTapToSeek()
a.lyricsViewer.SetLyrics(&mediaprovider.Lyrics{Synced: true,
Lines: []mediaprovider.LyricLine{{Text: ""}}})
a.lyricsViewer.SetLyrics(&mediaprovider.Lyrics{
Synced: true,
Lines: []mediaprovider.LyricLine{{Text: ""}},
})
tr, _ := a.nowPlaying.(*mediaprovider.Track)
go a.fetchLyrics(ctx, tr)
}
@@ -482,7 +484,6 @@ func (a *NowPlayingPage) OnPlayTimeUpdate(curTime, _ float64, seeked bool) {
func (a *NowPlayingPage) currentTracklistOrNil() *widgets.PlayQueueList {
if a.tabs != nil {
switch a.tabs.SelectedIndex() {
case 0: /*queue*/
return a.queueList
+3 -2
View File
@@ -389,7 +389,8 @@ func (p *PlaylistList) buildHeaderAndLayout() {
{Text: lang.L("Name"), Alignment: fyne.TextAlignLeading, CanToggleVisible: false},
{Text: lang.L("_Description"), Alignment: fyne.TextAlignLeading, CanToggleVisible: false},
{Text: lang.L("Owner"), Alignment: fyne.TextAlignLeading, CanToggleVisible: false},
{Text: trackCount, Alignment: fyne.TextAlignTrailing, CanToggleVisible: false}}, p.columnsLayout)
{Text: trackCount, Alignment: fyne.TextAlignTrailing, CanToggleVisible: false},
}, p.columnsLayout)
p.header.SetSorting(p.sorting)
p.header.OnColumnSortChanged = p.onSorted
}
@@ -422,7 +423,7 @@ func (p *PlaylistList) doSortPlaylists() {
return
}
switch p.sorting.ColNumber {
case 0: //Name
case 0: // Name
p.stringSort(func(p *mediaprovider.Playlist) string { return p.Name })
case 1: // Description
p.stringSort(func(p *mediaprovider.Playlist) string { return p.Description })
+4 -4
View File
@@ -253,7 +253,8 @@ func NewRadioList(nowPlayingIDPtr *string) *RadioList {
a.ExtendBaseWidget(a)
a.hdr = widgets.NewListHeader([]widgets.ListColumn{
{Text: lang.L("Name"), Alignment: fyne.TextAlignLeading, CanToggleVisible: false},
{Text: lang.L("Home Page"), Alignment: fyne.TextAlignLeading, CanToggleVisible: false}},
{Text: lang.L("Home Page"), Alignment: fyne.TextAlignLeading, CanToggleVisible: false},
},
a.columnsLayout)
a.hdr.DisableSorting = true
a.list = widgets.NewFocusList(
@@ -299,9 +300,8 @@ func NewRadioList(nowPlayingIDPtr *string) *RadioList {
row.IsPlaying = isPlaying
row.nameLabel.Segments[0].(*widget.TextSegment).Style.TextStyle.Bold = isPlaying
if isPlaying {
row.Content.(*fyne.Container).Objects[0] =
container.NewBorder(nil, nil, a.playingIcon, nil,
container.New(layout.NewCustomPaddedLayout(0, 0, -5, 0), row.nameLabel))
row.Content.(*fyne.Container).Objects[0] = container.NewBorder(nil, nil, a.playingIcon, nil,
container.New(layout.NewCustomPaddedLayout(0, 0, -5, 0), row.nameLabel))
} else {
row.Content.(*fyne.Container).Objects[0] = row.nameLabel
}