@@ -182,6 +182,7 @@ func (h *Handlers) serveProfile(w http.ResponseWriter, r *http.Request) { |
| 182 | 182 | followState := h.userFollowState(r.Context(), user.ID, viewer) |
| 183 | 183 | visibleRepos := h.visibleUserRepos(r.Context(), user.ID, viewer) |
| 184 | 184 | pinnedRepos, pinCandidates := h.userPinData(r.Context(), user) |
| 185 | + userPinsCap, _ := h.userProfilePinCap(r.Context(), user.ID) |
| 185 | 186 | readme, hasReadme := h.profileReadme(r.Context(), user, viewer) |
| 186 | 187 | displayName := user.DisplayName |
| 187 | 188 | if displayName == "" { |
@@ -213,7 +214,7 @@ func (h *Handlers) serveProfile(w http.ResponseWriter, r *http.Request) { |
| 213 | 214 | "Contributions": h.contributionCalendar(r.Context(), user, viewer, r.URL.Query()), |
| 214 | 215 | "PinnedRepos": pinnedRepos, |
| 215 | 216 | "PinCandidates": pinCandidates, |
| 216 | | - "PinsRemaining": profilePinsRemaining(pinCandidates), |
| 217 | + "PinsRemaining": profilePinsRemaining(pinCandidates, userPinsCap), |
| 217 | 218 | "CanCustomizePins": isSelf, |
| 218 | 219 | "PinsAction": "/" + url.PathEscape(user.Username) + "/pins", |
| 219 | 220 | "ContributionSettingsAction": "/" + url.PathEscape(user.Username) + "/contribution-settings", |