Some improvements

This commit is contained in:
2016-12-06 12:36:31 +09:00
parent c2d9817ec5
commit 1268aa8ba6
21 changed files with 72 additions and 273 deletions

View File

@ -1,8 +1,6 @@
package forum
import (
"sort"
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
"github.com/animenotifier/notify.moe/components"
@ -14,8 +12,7 @@ const threadsPerPage = 20
func Get(ctx *aero.Context) string {
tag := ctx.Get("tag")
threads, _ := arn.GetThreadsByTag(tag)
sort.Sort(threads)
arn.SortThreads(threads)
if len(threads) > threadsPerPage {
threads = threads[:threadsPerPage]