头像优化

This commit is contained in:
hahwu 2025-07-18 11:18:11 +08:00
parent 5155c77997
commit 45f3e27de2

View File

@ -30,14 +30,19 @@ func (f *FaceMod) InitData() {
now := GoUtil.Now() now := GoUtil.Now()
if f.List == nil { if f.List == nil {
f.List = make(map[int]*Face) f.List = make(map[int]*Face)
InitId := faceCfg.GetInitList()
for _, v := range InitId {
f.List[v] = &Face{
AddTime: now,
}
}
f.SetId = 1 f.SetId = 1
} }
InitId := faceCfg.GetInitList()
for _, v := range InitId {
if _, ok := f.List[v]; ok {
continue
}
// 初始化表情
f.List[v] = &Face{
AddTime: now,
}
}
} }
func (f *FaceMod) GetFaceNum() int { func (f *FaceMod) GetFaceNum() int {