aboutsummaryrefslogtreecommitdiff
path: root/ui
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 /ui
parent0c4f89f08f4fc557323922db238f73dd05d8f3d1 (diff)
added delete functionality
Diffstat (limited to 'ui')
-rw-r--r--ui/actions.go17
1 files changed, 9 insertions, 8 deletions
diff --git a/ui/actions.go b/ui/actions.go
index cc9e391..2d2b0f3 100644
--- a/ui/actions.go
+++ b/ui/actions.go
@@ -25,6 +25,7 @@ import (
p "github.com/manifoldco/promptui"
a "github.com/MikunoNaka/MAL2Go/anime"
m "github.com/MikunoNaka/MAL2Go/manga"
+ "github.com/MikunoNaka/macli/mal"
)
type AnimeAction struct {
@@ -48,16 +49,16 @@ func AnimeActionMenu(animeIsAdded bool) func(a.Anime) {
{"Set Episodes", "Set number of episodes watched", EpisodeInput},
// these only temporarily run AnimeStatusMenu
// because that functionality doesnt exist yet
- {"Set Score", "Set score", AnimeStatusMenu},
- {"Set Re-watching", "Set if re-watching", AnimeStatusMenu},
- {"Set Times Re-watched", "Set number of times re-watched", AnimeStatusMenu},
+ // {"Set Score", "Set score", AnimeStatusMenu},
+ // {"Set Re-watching", "Set if re-watching", AnimeStatusMenu},
+ // {"Set Times Re-watched", "Set number of times re-watched", AnimeStatusMenu},
}
// if anime not in list
if animeIsAdded {
options = append(
options,
- AnimeAction{"Delete Anime", "Delete Anime From Your MyAnimeList List.", AnimeStatusMenu},
+ AnimeAction{"Delete Anime", "Delete Anime From Your MyAnimeList List.", mal.DeleteAnime},
)
}
@@ -105,16 +106,16 @@ func MangaActionMenu(mangaIsAdded bool) func(m.Manga) {
{"Set Chapters", "Set number of chapters read", ChapterInput},
// these only temporarily run MangaStatusMenu
// because that functionality doesnt exist yet
- {"Set Score", "Set score", MangaStatusMenu},
- {"Set Re-reading", "Set if re-reading", MangaStatusMenu},
- {"Set Times Re-read", "Set number of times re-read", MangaStatusMenu},
+ // {"Set Score", "Set score", MangaStatusMenu},
+ // {"Set Re-reading", "Set if re-reading", MangaStatusMenu},
+ // {"Set Times Re-read", "Set number of times re-read", MangaStatusMenu},
}
// if manga not in list
if mangaIsAdded {
options = append(
options,
- MangaAction{"Delete Manga", "Delete Manga From Your MyAnimeList List.", MangaStatusMenu},
+ MangaAction{"Delete Manga", "Delete Manga From Your MyAnimeList List.", mal.DeleteManga},
)
}