Skip to content

Commit 2dbdc9b

Browse files
committed
feat: add the setting on SettingsTab
1 parent b304eeb commit 2dbdc9b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Config/SettingsTab.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,19 @@ export class SettingsTab extends PluginSettingTab {
223223
});
224224
});
225225

226+
new Setting(containerEl)
227+
.setName('Next recurrence appears on the line below')
228+
.setDesc(
229+
'Enabling this will make the next recurrence of a task appear on line below the completed task. Otherwise the next recurrence will appear on the line of the toggled task and the completed one below.',
230+
)
231+
.addToggle((toggle) => {
232+
const { recurrenceOnNextLine: recurrenceOnNextLine } = getSettings();
233+
toggle.setValue(recurrenceOnNextLine).onChange(async (value) => {
234+
updateSettings({ recurrenceOnNextLine: value });
235+
await this.plugin.saveSettings();
236+
});
237+
});
238+
226239
// ---------------------------------------------------------------------------
227240
containerEl.createEl('h4', { text: 'Auto-suggest Settings' });
228241
// ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)