feat: jsonrpc api get_all_ui_config_keys to get all "ui.*" config keys
#7579
+51
−1
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.
Adds an api to get all ui config keys. There already is an option to get all normal config keys (
"sys.config_keys"), but before this pr there was no way to get allui.*config keys.Why is this api needed?
For webxdc cleanup on desktop, which stores window position in a ui config key (such as
ui.desktop.webxdcBounds.676464) as soon as a webxdc is opened since many versions now. So listing all ui keys is a good way for us to find out which webxdc may have web data stored. unfortunately electron does not (yet?) have a way to list all origins that have web-data like android does, so this is the next best thing we can do before itterating all possible ids, see also deltachat/deltachat-desktop#5758.Why is this only a jsonrpc api and not another special/virtual config key like
"sys.config_keys"?r10s indicated that
ui.*-config keys are barely used (deltachat/deltachat-desktop#5790 (comment)), so I thought it makes more sense to add it as dedicated api which's existentence is checked by the typechecker, so it will be easier to not miss it when we should remove the api again in the future.But we could also do a dedicated special/virtual config key for it, if you think that is better, this is easy to change.