Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
49479b6f64
2 changed files with 12 additions and 0 deletions
|
@ -65,6 +65,8 @@ func refreshProtyle(rootID string) {
|
|||
for _, id := range rootIDs {
|
||||
task.AppendAsyncTaskWithDelay(task.ReloadProtyle, 200*time.Millisecond, util.PushReloadProtyle, id)
|
||||
}
|
||||
|
||||
task.AppendAsyncTaskWithDelay(task.ReloadProtyle, 200*time.Millisecond, util.PushReloadProtyle, rootID)
|
||||
}
|
||||
|
||||
// refreshRefCount 用于刷新定义块处的引用计数。
|
||||
|
|
|
@ -639,6 +639,16 @@ func checkoutRepo(id string) {
|
|||
Conf.Sync.Enabled = false
|
||||
Conf.Save()
|
||||
|
||||
// 回滚快照时默认为当前数据创建一个快照
|
||||
// When rolling back a snapshot, a snapshot is created for the current data by default https://github.com/siyuan-note/siyuan/issues/12470
|
||||
_, err = repo.Index("Backup before checkout", map[string]interface{}{eventbus.CtxPushMsg: eventbus.CtxPushMsgToStatusBarAndProgress})
|
||||
if err != nil {
|
||||
logging.LogErrorf("index repository failed: %s", err)
|
||||
util.PushClearProgress()
|
||||
util.PushErrMsg(fmt.Sprintf(Conf.Language(140), err), 0)
|
||||
return
|
||||
}
|
||||
|
||||
_, _, err = repo.Checkout(id, map[string]interface{}{eventbus.CtxPushMsg: eventbus.CtxPushMsgToStatusBarAndProgress})
|
||||
if err != nil {
|
||||
logging.LogErrorf("checkout repository failed: %s", err)
|
||||
|
|
Loading…
Add table
Reference in a new issue