🎨 Improve av

This commit is contained in:
Daniel 2025-08-23 22:15:31 +08:00
parent 161dd7eb2a
commit ef5236e0b1
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 24 additions and 32 deletions

View file

@ -92,7 +92,7 @@ func renderAttributeViewGroups(viewable av.Viewable, attrView *av.AttributeView,
if isGroupByDate(view) {
createdDate := time.UnixMilli(view.GroupCreated).Format("2006-01-02")
if time.Now().Format("2006-01-02") != createdDate {
regenAttrViewGroups(attrView, "force")
regenAttrViewGroups(attrView)
av.SaveAttributeView(attrView)
}
}
@ -108,7 +108,7 @@ func renderAttributeViewGroups(viewable av.Viewable, attrView *av.AttributeView,
for _, groupView := range view.Groups {
if (nil == groupView.GroupVal || nil == groupView.GroupKey) && !fixDev {
// TODO 分组上线后删除,预计 2025 年 9 月后可以删除
regenAttrViewGroups(attrView, "force")
regenAttrViewGroups(attrView)
av.SaveAttributeView(attrView)
fixDev = true
}