From 3a915ad8eaaa37bd703def4c4227792fa6f00a89 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Wed, 19 Aug 2020 18:21:53 -0400 Subject: [PATCH] Make New Post button contextual on coll sub-sections --- account.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/account.go b/account.go index fbe5ad0..de52a24 100644 --- a/account.go +++ b/account.go @@ -49,6 +49,7 @@ type ( Separator template.HTML IsAdmin bool CanInvite bool + CollAlias string } ) @@ -854,6 +855,7 @@ func viewEditCollection(app *App, u *User, w http.ResponseWriter, r *http.Reques Collection: c, Silenced: silenced, } + obj.UserPage.CollAlias = c.Alias showUserPage(w, "collection", obj) return nil @@ -1033,6 +1035,7 @@ func viewStats(app *App, u *User, w http.ResponseWriter, r *http.Request) error TopPosts: topPosts, Silenced: silenced, } + obj.UserPage.CollAlias = c.Alias if app.cfg.App.Federation { folls, err := app.db.GetAPFollowers(c) if err != nil {