Преглед на файлове

:art: 使用退格键删除内容时状态栏实时统计信息闪烁 https://github.com/siyuan-note/insider/issues/1082

Liang Ding преди 2 години
родител
ревизия
e59167912e
променени са 2 файла, в които са добавени 0 реда и са изтрити 11 реда
  1. 0 7
      kernel/model/transaction.go
  2. 0 4
      kernel/util/websocket.go

+ 0 - 7
kernel/model/transaction.go

@@ -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

+ 0 - 4
kernel/util/websocket.go

@@ -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: