Skip to content

Commit c72f726

Browse files
n0tooseGusted
andcommitted
Move UserLocationMapURL to PrepareContextForProfileBigAvatar
This fixes an issue where the location map icon is not shown when viewing a user's Projects or Packages. Co-authored-by: Gusted <postmaster@gusted.xyz>
1 parent 438c764 commit c72f726

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

routers/web/shared/user/header.go

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ func PrepareContextForProfileBigAvatar(ctx *context.Context) {
3333

3434
ctx.Data["IsFollowing"] = ctx.Doer != nil && user_model.IsFollowing(ctx.Doer.ID, ctx.ContextUser.ID)
3535
ctx.Data["ShowUserEmail"] = setting.UI.ShowUserEmail && ctx.ContextUser.Email != "" && ctx.IsSigned && !ctx.ContextUser.KeepEmailPrivate
36+
ctx.Data["UserLocationMapURL"] = setting.Service.UserLocationMapURL
3637

3738
// Show OpenID URIs
3839
openIDs, err := user_model.GetUserOpenIDs(ctx.ContextUser.ID)

routers/web/user/profile.go

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ func userProfile(ctx *context.Context) {
5252

5353
ctx.Data["Title"] = ctx.ContextUser.DisplayName()
5454
ctx.Data["PageIsUserProfile"] = true
55-
ctx.Data["UserLocationMapURL"] = setting.Service.UserLocationMapURL
5655

5756
// prepare heatmap data
5857
if setting.Service.EnableUserHeatmap {

0 commit comments

Comments
 (0)