Skip to content

Commit 1e53ffd

Browse files
greetclammyclaude
andcommitted
fix: Remove dead code and restore console.group
- Remove dead renderTab() promise detection code in settings-main.ts - Restore console.group/groupEnd for debug output visual hierarchy 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 61d2a48 commit 1e53ffd

File tree

3 files changed

+16
-26
lines changed

3 files changed

+16
-26
lines changed

main.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ export default class FirstLineIsTitle extends Plugin {
177177
return;
178178
}
179179

180-
console.debug("🔧 Settings (non-default values only):");
180+
// eslint-disable-next-line no-console -- console.group for visual hierarchy
181+
console.group("🔧 Settings (non-default values only)");
181182

182183
const nonDefaults: Record<string, unknown> = {};
183184

@@ -218,6 +219,8 @@ export default class FirstLineIsTitle extends Plugin {
218219

219220
if (Object.keys(nonDefaults).length === 0) {
220221
console.debug("All settings are at default values");
222+
// eslint-disable-next-line no-console -- console.groupEnd for visual hierarchy
223+
console.groupEnd();
221224
return;
222225
}
223226

@@ -236,6 +239,9 @@ export default class FirstLineIsTitle extends Plugin {
236239
console.debug(`${key}:`, value);
237240
}
238241
}
242+
243+
// eslint-disable-next-line no-console -- console.groupEnd for visual hierarchy
244+
console.groupEnd();
239245
}
240246

241247
async insertTitleOnCreation(file: TFile): Promise<void> {

manifest.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"id": "first-line-is-title",
3-
"name": "First Line is Title",
4-
"minAppVersion": "1.8.0",
5-
"description": "Automatically set the first line as note title.",
6-
"author": "greetclammy",
7-
"isDesktopOnly": false,
8-
"version": "3.10.1"
2+
"id": "first-line-is-title",
3+
"name": "First Line is Title",
4+
"minAppVersion": "1.8.0",
5+
"description": "Automatically set the first line as note title.",
6+
"author": "greetclammy",
7+
"isDesktopOnly": false,
8+
"version": "3.10.1"
99
}

src/settings/settings-main.ts

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -309,26 +309,10 @@ export class FirstLineIsTitleSettings extends PluginSettingTab {
309309

310310
if (tabConfig) {
311311
const tabInstance = new tabConfig.class(this.plugin, this.settingsPage);
312-
const result = tabInstance.render();
313-
if (
314-
result !== undefined &&
315-
typeof result === "object" &&
316-
result !== null &&
317-
"then" in result
318-
) {
319-
await (result as Promise<void>);
320-
}
312+
tabInstance.render();
321313
} else {
322314
const generalTab = new GeneralTab(this.plugin, this.settingsPage);
323-
const result = generalTab.render();
324-
if (
325-
result !== undefined &&
326-
typeof result === "object" &&
327-
result !== null &&
328-
"then" in result
329-
) {
330-
await (result as Promise<void>);
331-
}
315+
generalTab.render();
332316
}
333317
}
334318

0 commit comments

Comments
 (0)