if no tophid, retain or reset
This commit is contained in:
parent
c0d7cee48d
commit
7f1d3c7339
1 changed files with 8 additions and 2 deletions
10
web.go
10
web.go
|
|
@ -767,8 +767,12 @@ func honkpage(w http.ResponseWriter, u *login.UserInfo, honks []*Honk, templinfo
|
||||||
}
|
}
|
||||||
reverbolate(userid, honks)
|
reverbolate(userid, honks)
|
||||||
templinfo["Honks"] = honks
|
templinfo["Honks"] = honks
|
||||||
if templinfo["TopHID"] == nil && len(honks) > 0 {
|
if templinfo["TopHID"] == nil {
|
||||||
templinfo["TopHID"] = honks[0].ID
|
if len(honks) > 0 {
|
||||||
|
templinfo["TopHID"] = honks[0].ID
|
||||||
|
} else {
|
||||||
|
templinfo["TopHID"] = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
err := readviews.Execute(w, "honkpage.html", templinfo)
|
err := readviews.Execute(w, "honkpage.html", templinfo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -1674,6 +1678,8 @@ func webhydra(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
if len(honks) > 0 {
|
if len(honks) > 0 {
|
||||||
templinfo["TopHID"] = honks[0].ID
|
templinfo["TopHID"] = honks[0].ID
|
||||||
|
} else {
|
||||||
|
templinfo["TopHID"] = wanted
|
||||||
}
|
}
|
||||||
reverbolate(userid, honks)
|
reverbolate(userid, honks)
|
||||||
templinfo["Honks"] = honks
|
templinfo["Honks"] = honks
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue