aboutsummaryrefslogtreecommitdiff
path: root/cmd/search.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@protonmail.ch>2022-06-15 00:08:39 +0530
committerVidhu Kant Sharma <vidhukant@protonmail.ch>2022-06-15 00:08:39 +0530
commit028632de277704fe4576e732d4997daa70f25f60 (patch)
tree343137fc2b19cb7c9568324a9529218ca6065e49 /cmd/search.go
parent5ac21806f34a7c88d2685420d53cbd585f4b4f3d (diff)
added color coding and error handling + other visual appeal
Diffstat (limited to 'cmd/search.go')
-rw-r--r--cmd/search.go8
1 files changed, 6 insertions, 2 deletions
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() {