Skip to content

Commit

Permalink
refactor: remove unnecessary object when constructor settingtab
Browse files Browse the repository at this point in the history
  • Loading branch information
lifeodyssey committed Nov 25, 2023
1 parent 7f9b2da commit 4a18425
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class HexoIntegrationPlugin extends Plugin {
await this.loadSettings();

this.symlinkHandler = new SymlinkHandler(this.app);
this.addSettingTab(new HexoIntegrationSettingsTab(this.app,this, this.settings, this.symlinkHandler, this.settingsManager));
this.addSettingTab(new HexoIntegrationSettingsTab(this.app, this));
const hexoBlogPath = this.settings.hexoSourcePath;

this.gitHandler = new GitHandler(hexoBlogPath);
Expand Down
5 changes: 1 addition & 4 deletions src/settings/hexoIntegrationSettingsTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ export default class HexoIntegrationSettingsTab extends PluginSettingTab {
private symlinkHandler: SymlinkHandler;
private settingManager:SettingsManager

constructor(app: App,plugin:HexoIntegrationPlugin, settings: HexoIntegrationSettings, symlinkHandler: SymlinkHandler, settingsManager: SettingsManager) {
constructor(app: App,plugin:HexoIntegrationPlugin) {
super(app,plugin);
this.settings = settings;
this.symlinkHandler = symlinkHandler;
this.settingManager=settingsManager;
}


Expand Down

0 comments on commit 4a18425

Please sign in to comment.