1
1
mirror of https://github.com/go-gitea/gitea synced 2025-10-30 02:48:26 +00:00

Avoid emoji mismatch and allow to only enable chosen emojis (#35692)

Fix #23635
This commit is contained in:
wxiaoguang
2025-10-20 04:06:45 +08:00
committed by GitHub
parent c30d74d0f9
commit 66ee8f3553
6 changed files with 115 additions and 92 deletions

View File

@@ -33,6 +33,8 @@ var UI = struct {
ReactionsLookup container.Set[string] `ini:"-"`
CustomEmojis []string
CustomEmojisMap map[string]string `ini:"-"`
EnabledEmojis []string
EnabledEmojisSet container.Set[string] `ini:"-"`
SearchRepoDescription bool
OnlyShowRelevantRepos bool
ExploreDefaultSort string `ini:"EXPLORE_PAGING_DEFAULT_SORT"`
@@ -169,4 +171,5 @@ func loadUIFrom(rootCfg ConfigProvider) {
for _, emoji := range UI.CustomEmojis {
UI.CustomEmojisMap[emoji] = ":" + emoji + ":"
}
UI.EnabledEmojisSet = container.SetOf(UI.EnabledEmojis...)
}