fix: load dictype config on addon init#40
Merged
Xinkai merged 1 commit intoXinkai:masterfrom Mar 20, 2026
Merged
Conversation
Xinkai
approved these changes
Mar 20, 2026
Owner
|
Cheers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
这个改动是想修一下 dictype 的 addon 配置页没有正确带出用户自定义快捷键的问题。
我这边遇到的现象是,
~/.config/fcitx5/conf/dictype.conf里明明已经有自己改过的 trigger key,但重启fcitx5之后,配置页里看到的还是代码里的默认值。看了一下实现,
DictypeConfig在构造时先拿的是编译期默认值,reloadConfig()虽然有实现,但 addon 初始化时没有主动调用。所以如果配置页在这一轮里直接读 addon 当前内存里的配置,就会看到默认值,而不是用户配置文件里的值。这个 PR 只做了一件很小的事:在
DictypeFcitx构造函数里先调一次reloadConfig(),让 addon 初始化时就把conf/dictype.conf读进来。这样配置页和运行时都会先以用户配置为准,不会一上来先显示默认快捷键。