remove newlines before displaying playlist descriptions
This commit is contained in:
@@ -446,10 +446,9 @@ func (a *PlaylistPageHeader) Update(playlist *mediaprovider.PlaylistWithTracks)
|
|||||||
a.playlistInfo = playlist
|
a.playlistInfo = playlist
|
||||||
a.editButton.Hidden = playlist.Owner != a.page.sm.LoggedInUser
|
a.editButton.Hidden = playlist.Owner != a.page.sm.LoggedInUser
|
||||||
a.titleLabel.Segments[0].(*widget.TextSegment).Text = playlist.Name
|
a.titleLabel.Segments[0].(*widget.TextSegment).Text = playlist.Name
|
||||||
a.descriptionLabel.SetText(playlist.Description)
|
a.descriptionLabel.SetText(strings.ReplaceAll(playlist.Description, "\n", " "))
|
||||||
a.ownerLabel.SetText(a.formatPlaylistOwnerStr(playlist))
|
a.ownerLabel.SetText(a.formatPlaylistOwnerStr(playlist))
|
||||||
a.trackTimeLabel.SetText(a.formatPlaylistTrackTimeStr(playlist))
|
a.trackTimeLabel.SetText(a.formatPlaylistTrackTimeStr(playlist))
|
||||||
a.createdAtLabel.SetText("created at TODO")
|
|
||||||
|
|
||||||
var haveCover bool
|
var haveCover bool
|
||||||
if playlist.CoverArtID != "" {
|
if playlist.CoverArtID != "" {
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ func NewPlaylistList(initialSort widgets.ListHeaderSort) *PlaylistList {
|
|||||||
row.ListItemID = id
|
row.ListItemID = id
|
||||||
row.PlaylistID = a.playlists[id].ID
|
row.PlaylistID = a.playlists[id].ID
|
||||||
row.nameLabel.Text = a.playlists[id].Name
|
row.nameLabel.Text = a.playlists[id].Name
|
||||||
row.descrptionLabel.Text = a.playlists[id].Description
|
row.descrptionLabel.Text = strings.ReplaceAll(a.playlists[id].Description, "\n", " ")
|
||||||
row.ownerLabel.Text = a.playlists[id].Owner
|
row.ownerLabel.Text = a.playlists[id].Owner
|
||||||
row.trackCountLabel.Text = strconv.Itoa(a.playlists[id].TrackCount)
|
row.trackCountLabel.Text = strconv.Itoa(a.playlists[id].TrackCount)
|
||||||
row.Refresh()
|
row.Refresh()
|
||||||
|
|||||||
Reference in New Issue
Block a user