From bd0da056a9f4c1246ad5a980b1c824b7382478cf Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 3 Jul 2022 22:57:06 +0530 Subject: dynamically handling prompt length, search length, offset, etc --- ui/search.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'ui/search.go') diff --git a/ui/search.go b/ui/search.go index c62006a..7ea045a 100644 --- a/ui/search.go +++ b/ui/search.go @@ -30,8 +30,6 @@ import ( // only search animes probably only now func AnimeSearch(label, searchString string) a.Anime { - // TODO: load promptLength from config - promptLength := 5 animes := mal.SearchAnime(searchString) template := &p.SelectTemplates { @@ -57,7 +55,7 @@ More Details To Be Added Later Items: animes, Templates: template, Searcher: searcher, - Size: promptLength, + Size: PromptLength, } animeIndex, _, err := prompt.Run() @@ -70,8 +68,6 @@ More Details To Be Added Later } func MangaSearch(label, searchString string) m.Manga { - // TODO: load promptLength from config - promptLength := 5 mangas := mal.SearchManga(searchString) template := &p.SelectTemplates { @@ -97,7 +93,7 @@ More Details To Be Added Later Items: mangas, Templates: template, Searcher: searcher, - Size: promptLength, + Size: PromptLength, } mangaIndex, _, err := prompt.Run() -- cgit v1.2.3