refactor(share_settings): use this.$shareRootCheck instead of creating new local $button variable

This commit is contained in:
Panagiotis Papadopoulos
2025-04-20 19:24:58 +02:00
parent b0030f89b7
commit 0e31aab1ab

View File

@@ -112,8 +112,7 @@ export default class ShareSettingsOptions extends OptionsWidget {
}
async checkShareRoot() {
const $button = this.$widget.find(".check-share-root");
$button.prop("disabled", true);
this.$shareRootCheck.prop("disabled", true);
try {
const shareRootNotes = await searchService.searchForNotes("#shareRoot");
@@ -131,7 +130,7 @@ export default class ShareSettingsOptions extends OptionsWidget {
.text(shareRootNotes.length > 0 ? t("share.share_root_not_shared", { noteTitle: shareRootNotes[0].title }) : t("share.share_root_not_found"));
}
} finally {
$button.prop("disabled", false);
this.$shareRootCheck.prop("disabled", false);
}
}
}