Use optionWithButton

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-06-03 21:05:54 +05:30
parent a3271fb916
commit 98ef6f4321

View File

@ -93,9 +93,9 @@ export class BaseMessageView extends TemplateView {
createMenuOptions(vm) {
const options = [];
if (vm.canAbortSending) {
options.push(Menu.option(vm.i18n`Cancel`, () => vm.abortSending()));
options.push(Menu.optionWithButton(vm.i18n`Cancel`, () => vm.abortSending()));
} else if (vm.canRedact) {
options.push(Menu.option(vm.i18n`Delete`, () => vm.redact()).setDestructive());
options.push(Menu.optionWithButton(vm.i18n`Delete`, () => vm.redact()).setDestructive());
}
return options;
}