I'm currently struggling with a feature I want to implement for my plugin.
It should have quick action buttons on its main tab (e.g. for enabling/disabling some functionality).
Therefore I call an endpoint in my backend and there I change a setting like this:
import flask data = flask.request.get_json() if 'enabled' in data: self._settings.set(["enabled"], bool(data['enabled']))
Since the frontend doesn't know about this, I manually update the corresponding observable in my settings so when I open the settings page of my plugin it has the correct values:
This works and whenever I use this funcitonality, the checkbox on my settings page is updated properly. But here comes the problem: Let's say I update the 'enabled' state via the backend to 'false', the checkbox in my settings is unchecked but when I turn it back on in the settings and try to save, nothing happens. It seems like the frontend or backend has an internal state (?) and decides that there is nothing to save. Also the 'on_settings_save()' method isn't called in my backend.
Do you have an idea how I could solve this?
Thank you in advance!