aboutsummaryrefslogtreecommitdiff
path: root/ui/actions.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-07-03 22:57:06 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-07-03 22:57:06 +0530
commitbd0da056a9f4c1246ad5a980b1c824b7382478cf (patch)
tree3aedc5be2f841f8492b176cc77dcc95087caeede /ui/actions.go
parent8494b2933908d54d0c64ca08d877efe4e3d8d7b3 (diff)
dynamically handling prompt length, search length, offset, etc
Diffstat (limited to 'ui/actions.go')
-rw-r--r--ui/actions.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/ui/actions.go b/ui/actions.go
index b6bbf16..7831fe4 100644
--- a/ui/actions.go
+++ b/ui/actions.go
@@ -41,9 +41,6 @@ type MangaAction struct {
}
func AnimeActionMenu(animeIsAdded bool) func(a.Anime) {
- // TODO: load promptLength from config
- promptLength := 5
-
options := []AnimeAction {
{"Set Status", "Set status for an anime (watching, dropped, etc)", AnimeStatusMenu},
{"Set Episodes", "Set number of episodes watched", EpisodeInput},
@@ -83,7 +80,7 @@ func AnimeActionMenu(animeIsAdded bool) func(a.Anime) {
Items: options,
Templates: template,
Searcher: searcher,
- Size: promptLength,
+ Size: PromptLength,
}
res, _, err := prompt.Run()
@@ -96,9 +93,6 @@ func AnimeActionMenu(animeIsAdded bool) func(a.Anime) {
}
func MangaActionMenu(mangaIsAdded bool) func(m.Manga) {
- // TODO: load promptLength from config
- promptLength := 5
-
options := []MangaAction {
{"Set Status", "Set status for a manga (reading, dropped, etc)", MangaStatusMenu},
{"Set Chapters", "Set number of chapters read", ChapterInput},
@@ -138,7 +132,7 @@ func MangaActionMenu(mangaIsAdded bool) func(m.Manga) {
Items: options,
Templates: template,
Searcher: searcher,
- Size: promptLength,
+ Size: PromptLength,
}
res, _, err := prompt.Run()