|
|
@ -171,13 +171,14 @@ func updateTimelineCache(tl *localTimeline, reset bool) { |
|
|
|
postsInterfaces, err := tl.m.Get() |
|
|
|
postsInterfaces, err := tl.m.Get() |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
log.Error("[READ] Unable to cache posts: %v", err) |
|
|
|
log.Error("[READ] Unable to cache posts: %v", err) |
|
|
|
} |
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
castPosts := postsInterfaces.([]PublicPost) |
|
|
|
castPosts := postsInterfaces.([]PublicPost) |
|
|
|
tl.posts = &castPosts |
|
|
|
tl.posts = &castPosts |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func showLocalTimeline(app *App, w http.ResponseWriter, r *http.Request, page int, author, tag string) error { |
|
|
|
func showLocalTimeline(app *App, w http.ResponseWriter, r *http.Request, page int, author, tag string) error { |
|
|
|
updateTimelineCache(app.timeline, false) |
|
|
|
updateTimelineCache(app.timeline, false) |
|
|
|
|
|
|
|
|
|
|
|