Skip to content

Commit 3c8d07e

Browse files
committed
fix: use correct callbacks
1 parent c36fa03 commit 3c8d07e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/modals/MediaDbPreviewModal.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export class MediaDbPreviewModal extends Modal {
77
options: { attachTemplate: boolean, attachFile: TFile};
88
submitCallback: (res: boolean) => void;
99
closeCallback: (err?: Error) => void;
10-
skipCallback: () => void;
1110
plugin: MediaDbPlugin;
1211
searchBtn: any;
1312
cancelButton: any;
@@ -44,14 +43,14 @@ export class MediaDbPreviewModal extends Modal {
4443
const bottomSettingRow = new Setting(contentEl);
4544
bottomSettingRow.addButton(btn => {
4645
btn.setButtonText('Cancel');
47-
btn.onClick(() => this.close());
46+
btn.onClick(() => this.closeCallback());
4847
btn.buttonEl.addClass('media-db-plugin-button');
4948
this.cancelButton = btn;
5049
});
5150
bottomSettingRow.addButton(btn => {
5251
btn.setButtonText('Ok');
5352
btn.setCta();
54-
btn.onClick(() => this.submit());
53+
btn.onClick(() => this.submitCallback(true));
5554
btn.buttonEl.addClass('media-db-plugin-button');
5655
this.submitButton = btn;
5756
})

0 commit comments

Comments
 (0)