From fc3a19a502fcf9ea055bbdeda5859e9a1f99d608 Mon Sep 17 00:00:00 2001 From: aditya-K2 Date: Fri, 19 May 2023 01:10:11 +0530 Subject: [PATCH] Renaming --- ui/app.go | 6 +++--- ui/view_albums.go | 2 +- ui/view_top.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/app.go b/ui/app.go index 82dc4e5..0d544b7 100644 --- a/ui/app.go +++ b/ui/app.go @@ -305,11 +305,11 @@ func NewApplication() *tview.Application { })) topTracksView.SetActions(utils.MergeMaps(globalActions, map[string]*Action{ "play_entry": NewAction(func(e *tcell.EventKey) *tcell.EventKey { - topTracksView.PlaySelectedEntry() + topTracksView.PlayEntry() return nil }, progressBar), "queue_entry": NewAction(func(e *tcell.EventKey) *tcell.EventKey { - topTracksView.QueueSelectedEntry() + topTracksView.QueueEntry() return nil }, nil), })) @@ -343,7 +343,7 @@ func NewApplication() *tview.Application { return nil }, progressBar), "queue_entry": NewAction(func(e *tcell.EventKey) *tcell.EventKey { - albumsView.QueueSelectEntry() + albumsView.QueueEntry() return nil }, progressBar), })) diff --git a/ui/view_albums.go b/ui/view_albums.go index d85d2af..6ac69b4 100644 --- a/ui/view_albums.go +++ b/ui/view_albums.go @@ -59,7 +59,7 @@ func (a *AlbumsView) PlayEntry() { } } -func (a *AlbumsView) QueueSelectEntry() { +func (a *AlbumsView) QueueEntry() { r, _ := Main.GetSelection() alb := (*a.savedAlbums)[r] msg := SendNotificationWithChan("Queueing " + alb.Name + "...") diff --git a/ui/view_top.go b/ui/view_top.go index 4f06a55..4bd962f 100644 --- a/ui/view_top.go +++ b/ui/view_top.go @@ -74,7 +74,7 @@ func (a *TopTracksView) handle(trackHandler, artistHandler func(r int)) { } } -func (a *TopTracksView) PlaySelectedEntry() { +func (a *TopTracksView) PlayEntry() { a.handle(nil, func(r int) { if err := spt.PlayContext(a.topArtists[r-1].URI); err != nil { SendNotification(err.Error()) @@ -96,7 +96,7 @@ func (a *TopTracksView) OpenEntry() { a.handle(trackHandler, artistHandler) } -func (a *TopTracksView) QueueSelectedEntry() { +func (a *TopTracksView) QueueEntry() { a.handle(func(r int) { msg := fmt.Sprintf("%s Queued Succesfully!", a.topTracks[r-2-len(a.topArtists)].Name) if err := spt.QueueTracks(a.topTracks[r-2-len(a.topArtists)].ID); err != nil {