Commit d4153900 authored by Jonny Schäfer's avatar Jonny Schäfer
Browse files

add support for multiple pages in "new videos" view

parent 45210cfa
Pipeline #289 skipped
......@@ -98,12 +98,12 @@ func logicSearch(title string) {
}
logicVarLazy = listNew(upd)
logicSearchPage(title, "0")
logicSearchPage("searching: "+title, "0")
}
//logicSearchPage searches the title in the given page
func logicSearchPage(title, page string) {
cliStatus("page " + page + " | searching for: " + title)
cliStatus("page " + page + " | " + title)
logicVarWindow = logicWindowSearch
logicVarSearch = title
......@@ -296,15 +296,13 @@ func logicNew(none string) {
cliStatus("sorting ...")
sort.Sort(&videoSort{videos})
if len(videos) > 30 {
videos = videos[0:30] // TODO add multiple pages
upd := func(state int) []*videoContainer {
all := videos
videos = nil
return all
}
cliHome()
fmt.Println()
cliStatus("newest videos")
logicList(-1, videos)
logicVarLazy = listNew(upd)
logicSearchPage("new videos", "0")
}
// logicSet sets the key to the given value. Format: "key value"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment