Code Monkey home page Code Monkey logo

Comments (2)

Blondwolf avatar Blondwolf commented on July 18, 2024

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.howToParseInternalLinks = settings.howToParseInternalLinks;
this.ignoreCompletedTasks = settings.ignoreCompletedTasks;

from obsidian-to-ical-plugin.

andrewbrereton avatar andrewbrereton commented on July 18, 2024

Resolved in #51 and released in 1.15.0.

from obsidian-to-ical-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.