Extension settings changed programatically don't show in UI #897
sebastian-correa
started this conversation in
Extensions and Themes
Replies: 1 comment 1 reply
-
We don't really support this. The users should be in control of the user settings. It seems like you found a way to override that. If we directly supported a "Reset" function like your is would be different, but I'm not sure we want to do that. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem
I am trying to implement a reset to default "button" as a select preference. The entry in
manifest.json
looks like this:And the
PreferencesUpdateListener
looks like this:When I toggle the Reset button to reset and save, the extension's behaviour changes but the UI doesn't reflect that.
Source can be found here.
Steps to reproduce
PreferencesUpdateListener
with anon_event
method that updates a preference with a predefined value.on_event
method (in my case, by toggling a button in the preferences menu).See attached video for illustration.
Current behavior
PreferencesUpdateListener
resets theextension.preferences
property to its default value and the behaviour changes accordingly. That is, when I use the extension, the new set values are in effect.However, the extensions settings UI shows the old values.
Expected behavior
When I change the
extension.preferences
property in aPreferencesUpdateListener
, both the behaviour and the values in the settings UI should reflect these new values.Environment
Ulauncher version: 5.11.0
Linux distro: Pop_OS! 20.10
Desktop environment: Gnome 3.38.3
Logs
Not sure whether they add much information, but here they are. They correspond to the process shown in the video.
Closing remarks
This might not be a bug. I suspect I have to tell the extension to update the UI once the values are set in the code. I did not find a way to do this, and this template suits the issue the best. Feel free to change the tags.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions