mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Backlink and backmention sort mode persistence (#16291)
fix https://github.com/siyuan-note/siyuan/issues/7764
This commit is contained in:
parent
f45f2c7cdb
commit
d14501178d
5 changed files with 46 additions and 15 deletions
|
|
@ -229,8 +229,17 @@ func InitConf() {
|
|||
Conf.Tag = conf.NewTag()
|
||||
}
|
||||
|
||||
defaultEditor := conf.NewEditor()
|
||||
if nil == Conf.Editor {
|
||||
Conf.Editor = conf.NewEditor()
|
||||
Conf.Editor = defaultEditor
|
||||
}
|
||||
// 新增字段的默认值
|
||||
// 使用指针类型来区分字段不存在(nil)和用户设置为 0(非 nil)
|
||||
if nil == Conf.Editor.BacklinkSort {
|
||||
Conf.Editor.BacklinkSort = defaultEditor.BacklinkSort
|
||||
}
|
||||
if nil == Conf.Editor.BackmentionSort {
|
||||
Conf.Editor.BackmentionSort = defaultEditor.BackmentionSort
|
||||
}
|
||||
if 1 > len(Conf.Editor.Emoji) {
|
||||
Conf.Editor.Emoji = []string{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue