Skip to content

How to update global settings from plugin main.js? #101

Answered by ChekTek
Muhomorik asked this question in Help
Discussion options

You must be logged in to vote

It looks like you using setGlobalSettings in your didReceiveSettings callback, but that callback is only triggered when getGlobalSettings is called. You'll want to set your settings before you call getGlobalSettings in order to see them in the event.

$SD.onConnected((jsn) => {
	$SD.setGlobalSettings({ global: 'global' });
	$SD.getGlobalSettings();
});

$SD.onDidReceiveGlobalSettings((jsn) => {
	console.log(jsn);
});

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ChekTek
Comment options

Answer selected by Muhomorik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants