Show friends on anime

This commit is contained in:
2017-07-21 11:25:53 +02:00
parent c0e324cefd
commit 22fe164f34
7 changed files with 47 additions and 13 deletions

View File

@ -2,7 +2,6 @@ package profile
import (
"net/http"
"sort"
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
@ -20,10 +19,7 @@ func GetFollowers(ctx *aero.Context) string {
}
followers := viewUser.Followers()
sort.Slice(followers, func(i, j int) bool {
return followers[i].LastSeen > followers[j].LastSeen
})
arn.SortUsersLastSeen(followers)
return ctx.HTML(components.ProfileFollowers(followers, viewUser, utils.GetUser(ctx), ctx.URI()))