diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-06-16 13:43:19 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-06-16 13:43:19 +0530 |
commit | e93a197b6f47ed45e5f2dbe10762d6344a3e32c7 (patch) | |
tree | 7aadb4659b288fa3293360a6804f57c6c2e6c050 /cmd/search.go | |
parent | 0c4f89f08f4fc557323922db238f73dd05d8f3d1 (diff) |
added delete functionality
Diffstat (limited to 'cmd/search.go')
-rw-r--r-- | cmd/search.go | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/cmd/search.go b/cmd/search.go index 453f13d..5f97861 100644 --- a/cmd/search.go +++ b/cmd/search.go @@ -46,26 +46,20 @@ var searchCmd = &cobra.Command { } func searchManga(searchInput string) { - mangaIsAdded := false if searchInput == "" { searchInput = ui.TextInput("Search Manga: ", "Search can't be blank.") } manga := ui.MangaSearch("Select Manga:", searchInput) - if manga.MyListStatus.Status != "" { - mangaIsAdded = true - } + mangaIsAdded := manga.MyListStatus.Status != "" ui.MangaActionMenu(mangaIsAdded)(manga) } func searchAnime(searchInput string) { - animeIsAdded := false if searchInput == "" { searchInput = ui.TextInput("Search Anime: ", "Search can't be blank.") } anime := ui.AnimeSearch("Select Anime:", searchInput) - if anime.MyListStatus.Status != "" { - animeIsAdded = true - } + animeIsAdded := anime.MyListStatus.Status != "" ui.AnimeActionMenu(animeIsAdded)(anime) } |