Add functionality to repeat current track
This new Loop mode keeps reproducing the current track, unless it is changed using the player controls to go to the next/previous track. As in other applications, this is set by using the "Repeat" button, which now goes from "Off" -> "Repeat All" -> "Repeat One".
This commit is contained in:
@@ -68,8 +68,13 @@ func (a *AuxControls) OnChangeLoopMode(f func()) {
|
||||
func (a *AuxControls) SetLoopMode(mode string) {
|
||||
if mode == "all" {
|
||||
a.loop.Importance = widget.HighImportance
|
||||
a.loop.Icon = theme.MediaReplayIcon()
|
||||
} else if mode == "one" {
|
||||
a.loop.Importance = widget.HighImportance
|
||||
a.loop.Icon = theme.MediaReplayIcon() // TODO: This icon must be changed to the "Repeat" one with a 1.
|
||||
} else {
|
||||
a.loop.Importance = widget.MediumImportance
|
||||
a.loop.Icon = theme.MediaReplayIcon()
|
||||
}
|
||||
a.loop.Refresh()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user