@@ -63,17 +63,6 @@ func userProfile(ctx *context.Context) {
63
63
ctx .Data ["Title" ] = ctx .ContextUser .DisplayName ()
64
64
ctx .Data ["PageIsUserProfile" ] = true
65
65
66
- // prepare heatmap data
67
- if setting .Service .EnableUserHeatmap {
68
- data , err := activities_model .GetUserHeatmapDataByUser (ctx , ctx .ContextUser , ctx .Doer )
69
- if err != nil {
70
- ctx .ServerError ("GetUserHeatmapDataByUser" , err )
71
- return
72
- }
73
- ctx .Data ["HeatmapData" ] = data
74
- ctx .Data ["HeatmapTotalContributions" ] = activities_model .GetTotalContributionsInHeatmap (data )
75
- }
76
-
77
66
profileDbRepo , profileReadmeBlob := shared_user .FindOwnerProfileReadme (ctx , ctx .Doer )
78
67
79
68
prepareUserProfileTabData (ctx , profileDbRepo , profileReadmeBlob )
@@ -172,6 +161,17 @@ func prepareUserProfileTabData(ctx *context.Context, profileDbRepo *repo_model.R
172
161
ctx .Data ["Cards" ] = following
173
162
total = int (numFollowing )
174
163
case "activity" :
164
+ // prepare heatmap data
165
+ if setting .Service .EnableUserHeatmap {
166
+ data , err := activities_model .GetUserHeatmapDataByUser (ctx , ctx .ContextUser , ctx .Doer )
167
+ if err != nil {
168
+ ctx .ServerError ("GetUserHeatmapDataByUser" , err )
169
+ return
170
+ }
171
+ ctx .Data ["HeatmapData" ] = data
172
+ ctx .Data ["HeatmapTotalContributions" ] = activities_model .GetTotalContributionsInHeatmap (data )
173
+ }
174
+
175
175
date := ctx .FormString ("date" )
176
176
pagingNum = setting .UI .FeedPagingNum
177
177
showPrivate := ctx .IsSigned && (ctx .Doer .IsAdmin || ctx .Doer .ID == ctx .ContextUser .ID )
0 commit comments