You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure about this personally. I dont find much documentation about Obsidian plugins dev.
It feels like this.settings.isDebug for example can be accessible directly from the Plugin class. So the Plugin already has this settings. You could just send those setting in a class which is already created src/Model/Settings.js.
If you want to simplify the parameters, you can just pass this.settings from the main to other classes you need for treatment.
Then instead of
this.taskFinder = new TaskFinder(this.app.vault, this.settings.howToParseInternalLinks, this.settings.ignoreCompletedTasks, this.settings.ignoreOldTasks, this.settings.oldTaskInDays, this.settings.isIncludeTodos);
You can do
this.taskFinder = new TaskFinder(this.app.vault, this.settings);
And then process to get them back in the class the same way you would do with a singleton
This ticket is to discuss about wether or not it would be a good idea to create a singleton to store global settings as mentioned here
The text was updated successfully, but these errors were encountered: