From 4a18425dba8a2f18660ebd66ea1d9b6ece7409b8 Mon Sep 17 00:00:00 2001 From: lifeodyssey Date: Sat, 25 Nov 2023 13:37:04 +0800 Subject: [PATCH] refactor: remove unnecessary object when constructor settingtab --- src/index.ts | 2 +- src/settings/hexoIntegrationSettingsTab.ts | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index 988a8af..0e7972c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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); diff --git a/src/settings/hexoIntegrationSettingsTab.ts b/src/settings/hexoIntegrationSettingsTab.ts index bffb8f3..4eedabd 100644 --- a/src/settings/hexoIntegrationSettingsTab.ts +++ b/src/settings/hexoIntegrationSettingsTab.ts @@ -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; }