mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 使用退格键删除内容时状态栏实时统计信息闪烁 https://github.com/siyuan-note/insider/issues/1082
This commit is contained in:
@@ -997,8 +997,6 @@ func (tx *Transaction) begin() (err error) {
|
||||
|
||||
func (tx *Transaction) commit() (err error) {
|
||||
for _, tree := range tx.trees {
|
||||
go pushTreeStat(tree)
|
||||
|
||||
if err = writeJSONQueue(tree); nil != err {
|
||||
return
|
||||
}
|
||||
@@ -1009,11 +1007,6 @@ func (tx *Transaction) commit() (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func pushTreeStat(tree *parse.Tree) {
|
||||
stat := treenode.StatTree(tree)
|
||||
util.PushStatusBarCounter(stat)
|
||||
}
|
||||
|
||||
func (tx *Transaction) rollback() {
|
||||
tx.trees, tx.nodes = nil, nil
|
||||
return
|
||||
|
||||
@@ -159,10 +159,6 @@ type BlockStatResult struct {
|
||||
RefCount int `json:"refCount"`
|
||||
}
|
||||
|
||||
func PushStatusBarCounter(stat *BlockStatResult) {
|
||||
BroadcastByType("main", "statusbarCounter", 0, "", stat)
|
||||
}
|
||||
|
||||
func ContextPushMsg(context map[string]interface{}, msg string) {
|
||||
switch context[eventbus.CtxPushMsg].(int) {
|
||||
case eventbus.CtxPushMsgToProgress:
|
||||
|
||||
Reference in New Issue
Block a user