0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-07-19 19:18:43 +02:00

Add missing changes

This commit is contained in:
Lunny Xiao 2025-01-05 22:30:41 -08:00
parent cd3a9afe8f
commit cdf05fb726
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
3 changed files with 18 additions and 11 deletions

View File

@ -46,9 +46,17 @@ func RefBlame(ctx *context.Context) {
return
}
// ctx.Data["RepoPreferences"] = ctx.Session.Get("repoPreferences")
showFileViewTreeSidebar := true
if ctx.Doer != nil {
v, err := user_model.GetUserSetting(ctx, ctx.Doer.ID, user_model.SettingsKeyShowFileViewTreeSidebar, "true")
if err != nil {
log.Error("GetUserSetting: %v", err)
} else {
showFileViewTreeSidebar, _ = strconv.ParseBool(v)
}
}
ctx.Data["RepoPreferences"] = &preferencesForm{
ShowFileViewTreeSidebar: true,
ShowFileViewTreeSidebar: showFileViewTreeSidebar,
}
branchLink := ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()

View File

@ -1,5 +1,4 @@
// Copyright 2014 The Gogs Authors. All rights reserved.
// Copyright 2018 The Gitea Authors. All rights reserved.
// Copyright 2024 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package repo