@@ -12,7 +12,6 @@ import (
1212 "strings"
1313 "time"
1414
15- user_model "code.gitea.io/gitea/models/user"
1615 "code.gitea.io/gitea/modules/base"
1716 "code.gitea.io/gitea/modules/htmlutil"
1817 "code.gitea.io/gitea/modules/markup"
@@ -21,7 +20,6 @@ import (
2120 "code.gitea.io/gitea/modules/templates/eval"
2221 "code.gitea.io/gitea/modules/util"
2322 "code.gitea.io/gitea/services/gitdiff"
24- "code.gitea.io/gitea/services/webtheme"
2523)
2624
2725// NewFuncMap returns functions for injecting to templates
@@ -130,7 +128,6 @@ func NewFuncMap() template.FuncMap {
130128 "DisableWebhooks" : func () bool {
131129 return setting .DisableWebhooks
132130 },
133- "UserThemeName" : userThemeName ,
134131 "NotificationSettings" : func () map [string ]any {
135132 return map [string ]any {
136133 "MinTimeout" : int (setting .UI .Notification .MinTimeout / time .Millisecond ),
@@ -217,16 +214,6 @@ func evalTokens(tokens ...any) (any, error) {
217214 return n .Value , err
218215}
219216
220- func userThemeName (user * user_model.User ) string {
221- if user == nil || user .Theme == "" {
222- return setting .UI .DefaultTheme
223- }
224- if webtheme .IsThemeAvailable (user .Theme ) {
225- return user .Theme
226- }
227- return setting .UI .DefaultTheme
228- }
229-
230217func isQueryParamEmpty (v any ) bool {
231218 return v == nil || v == false || v == 0 || v == int64 (0 ) || v == ""
232219}
0 commit comments