Skip to content

Commit

Permalink
chore: delete unused stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
danielo515 committed Nov 2, 2023
1 parent ab2e20d commit d9183da
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,24 +76,10 @@ export default class ModalFormPlugin extends Plugin {

}

async saveForm(formDefinition: FormDefinition) {
const index = this.settings?.formDefinitions.findIndex((form) => form.name === formDefinition.name);
if (index === undefined || index === -1) {
this.settings?.formDefinitions.push(formDefinition);
} else {
this.settings?.formDefinitions.splice(index, 1, formDefinition);
}
console.log(this.settings, index)
await this.saveSettings();
// go back to manage forms and refresh it
await this.activateView(MANAGE_FORMS_VIEW);
}

closeEditForm() {
this.app.workspace.detachLeavesOfType(EDIT_FORM_VIEW);
}


onunload() {
this.unsubscribeSettingsStore();
}
Expand Down

0 comments on commit d9183da

Please sign in to comment.