Fix delete a rule in Email Rules, screen jump back to dashboard

This commit is contained in:
dab246
2025-08-26 01:10:32 +07:00
committed by Dat H. Pham
parent 50c5a77ee7
commit 1b1d978801
@@ -160,6 +160,7 @@ class EmailRulesController extends BaseController {
..onCancelAction(AppLocalizations.of(context).cancel, () =>
popBack())
..onConfirmAction(AppLocalizations.of(context).delete, () {
popBack();
_handleDeleteEmailRuleAction(emailRule);
}))
.show();
@@ -171,15 +172,12 @@ class EmailRulesController extends BaseController {
AppLocalizations.of(context).delete,
cancelTitle: AppLocalizations.of(context).cancel,
onConfirmAction: () => _handleDeleteEmailRuleAction(emailRule),
onCancelAction: popBack,
onCloseButtonAction: popBack,
);
}
}
void _handleDeleteEmailRuleAction(TMailRule emailRule) {
popBack();
if (emailRule.conditionGroup != null) {
emailRule = TMailRule(
id: emailRule.id,