From e93a197b6f47ed45e5f2dbe10762d6344a3e32c7 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Thu, 16 Jun 2022 13:43:19 +0530 Subject: added delete functionality --- cmd/search.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'cmd') 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) } -- cgit v1.2.3