From e96531d4f83129d9ded98d3dbb76eeef6fb679e9 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Thu, 30 Jun 2022 21:36:56 +0530 Subject: Passing in selectedManga instead of manga to ui.MangaStatusMenu to properly display current status --- cmd/status.go | 8 ++++---- cmd/version.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'cmd') diff --git a/cmd/status.go b/cmd/status.go index 6a23bfd..05b9dc4 100644 --- a/cmd/status.go +++ b/cmd/status.go @@ -83,7 +83,7 @@ func setAnimeStatus(statusInput, searchInput string) { } if statusInput == "" { - ui.AnimeStatusMenu(anime) + ui.AnimeStatusMenu(selectedAnime) } else { resp := mal.SetAnimeStatus(anime.Id, statusInput) fmt.Println(ui.CreateStatusUpdateConfirmationMessage(anime.Title, resp.Status)) @@ -102,7 +102,7 @@ func setMangaStatus(statusInput, searchInput string) { } manga := ui.MangaSearch("Select Manga:", searchInput) - selectedManga := mal.GetAnimeData(manga.Id, []string{"my_list_status"}) + selectedManga := mal.GetMangaData(manga.Id, []string{"my_list_status"}) if queryOnlyMode { status := selectedManga.MyListStatus.Status @@ -112,9 +112,9 @@ func setMangaStatus(statusInput, searchInput string) { } if statusInput == "" { - ui.MangaStatusMenu(manga) + ui.MangaStatusMenu(selectedManga) } else { - resp := mal.SetMangaStatus(manga.Id, statusInput) + resp := mal.SetMangaStatus(selectedManga.Id, statusInput) fmt.Println(resp.Status) fmt.Println(ui.CreateStatusUpdateConfirmationMessage(manga.Title, resp.Status)) } diff --git a/cmd/version.go b/cmd/version.go index cc40407..f5ca999 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" ) -var version string = "v1.4.1" +var version string = "v1.4.2" var versionCmd = &cobra.Command { Use: "version", -- cgit v1.2.3