Merge pull request #7 from animenotifier/go

Removed PrefetchAnime()
This commit is contained in:
Allen Lydiard 2017-11-05 14:52:48 -04:00 committed by GitHub
commit be4ea860d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 0 additions and 8 deletions

View File

@ -29,7 +29,6 @@ func BenchmarkRenderThread(b *testing.B) {
func BenchmarkRenderAnimeList(b *testing.B) {
user, _ := arn.GetUser("4J6qpK1ve")
animeList := user.AnimeList()
animeList.PrefetchAnime()
b.ReportAllocs()
b.ResetTimer()

View File

@ -25,7 +25,6 @@ func Get(ctx *aero.Context) string {
return ctx.Error(http.StatusNotFound, "Anime list not found", nil)
}
animeList.PrefetchAnime()
animeList.Sort()
return ctx.HTML(components.ProfileAnimeLists(animeList.SplitByStatus(), animeList.User(), user, ctx.URI()))

View File

@ -39,7 +39,6 @@ func statusList(ctx *aero.Context, status string) (*arn.AnimeList, string) {
}
watchingList := animeList.FilterStatus(status)
watchingList.PrefetchAnime()
watchingList.Sort()
return watchingList, ""

View File

@ -53,7 +53,6 @@ func Get(ctx *aero.Context) string {
}
animeList = animeList.Watching()
animeList.PrefetchAnime()
for _, item := range animeList.Items {
futureEpisodes := item.Anime().UpcomingEpisodes()

View File

@ -28,7 +28,6 @@ func Get(ctx *aero.Context) string {
}
watchingList := animeList.Watching()
watchingList.PrefetchAnime()
watchingList.Sort()
return utils.AllowEmbed(ctx, ctx.HTML(components.AnimeList(watchingList, animeList.User(), user)))

View File

@ -32,7 +32,6 @@ func AnimeList(ctx *aero.Context, user *arn.User, status string) string {
return ctx.Error(http.StatusNotFound, "Anime list not found", nil)
}
animeList.PrefetchAnime()
animeList.Sort()
return ctx.HTML(components.Home(animeList.FilterStatus(status), viewUser, user, status))

View File

@ -37,7 +37,6 @@ func Profile(ctx *aero.Context, viewUser *arn.User) string {
user = utils.GetUser(ctx)
}, func() {
animeList = viewUser.AnimeList()
animeList.PrefetchAnime()
// Sort by rating
sort.Slice(animeList.Items, func(i, j int) bool {

View File

@ -28,7 +28,6 @@ func GetStatsByUser(ctx *aero.Context) string {
}
animeList, err := arn.GetAnimeList(viewUser.ID)
animeList.PrefetchAnime()
if err != nil {
return ctx.Error(http.StatusInternalServerError, "Anime list not found", err)