Skip to content

Commit

Permalink
🎨 Database block loading animation #9416
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Oct 12, 2023
1 parent 1590913 commit 0ea9b8f
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions kernel/model/attribute_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ func GetBlockAttributeViewKeys(blockID string) (ret []*BlockAttributeViewKeys) {
}

func RenderAttributeView(avID string) (viewable av.Viewable, attrView *av.AttributeView, err error) {
start := time.Now()
waitForSyncingStorages()

if avJSONPath := av.GetAttributeViewDataPath(avID); !gulu.File.IsExist(avJSONPath) {
Expand Down Expand Up @@ -290,12 +289,6 @@ func RenderAttributeView(avID string) (viewable av.Viewable, attrView *av.Attrib
viewable.FilterRows()
viewable.SortRows()
viewable.CalcCols()

used := time.Since(start)
if minSleep := used.Milliseconds() - 256; 0 > minSleep {
// 补全加载时间到 256ms,避免前端动画闪烁干扰视觉
time.Sleep(time.Duration(-minSleep) * time.Millisecond)
}
return
}

Expand Down

0 comments on commit 0ea9b8f

Please sign in to comment.