🎨 Reduce the delay in adding rows in database table view https://github.com/siyuan-note/siyuan/issues/10082

This commit is contained in:
Daniel 2024-01-07 22:53:05 +08:00
parent d5e098a285
commit 3bfbfbc7e9
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 41 additions and 2 deletions

View file

@ -38,6 +38,27 @@ import (
"github.com/siyuan-note/siyuan/kernel/util"
)
func GetAttributeViewFilterSort(id string) (filters []*av.ViewFilter, sorts []*av.ViewSort) {
waitForSyncingStorages()
attrView, err := av.ParseAttributeView(id)
if nil != err {
logging.LogErrorf("parse attribute view [%s] failed: %s", id, err)
return
}
filters = []*av.ViewFilter{}
sorts = []*av.ViewSort{}
for _, view := range attrView.Views {
switch view.LayoutType {
case av.LayoutTypeTable:
filters = view.Table.Filters
sorts = view.Table.Sorts
}
}
return
}
func SearchAttributeViewNonRelationKey(avID, keyword string) (ret []*av.Key) {
waitForSyncingStorages()