aboutsummaryrefslogtreecommitdiff
path: root/cmd/search.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-06-16 13:43:19 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-06-16 13:43:19 +0530
commite93a197b6f47ed45e5f2dbe10762d6344a3e32c7 (patch)
tree7aadb4659b288fa3293360a6804f57c6c2e6c050 /cmd/search.go
parent0c4f89f08f4fc557323922db238f73dd05d8f3d1 (diff)
added delete functionality
Diffstat (limited to 'cmd/search.go')
-rw-r--r--cmd/search.go10
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)
}