From 028632de277704fe4576e732d4997daa70f25f60 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Wed, 15 Jun 2022 00:08:39 +0530 Subject: added color coding and error handling + other visual appeal --- cmd/search.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cmd') diff --git a/cmd/search.go b/cmd/search.go index 2496e17..463b109 100644 --- a/cmd/search.go +++ b/cmd/search.go @@ -52,11 +52,15 @@ func searchManga(searchInput string) { } func searchAnime(searchInput string) { + animeIsAdded := false if searchInput == "" { searchInput = ui.TextInput("Search Anime:", "Search can't be blank.") } - animeId := ui.SearchAndGetID("Select Anime", searchInput) - ui.ActionMenu()(animeId) + anime := ui.AnimeSearch("Select Anime", searchInput) + if anime.MyListStatus.Status != "" { + animeIsAdded = true + } + ui.ActionMenu(animeIsAdded)(anime) } func init() { -- cgit v1.2.3