feat: Use the displayed email id here, not only _currentEmailId.

This commit is contained in:
dab246
2026-03-27 10:16:10 +07:00
committed by Dat H. Pham
parent 432c482155
commit 2a58247b2b
@@ -344,8 +344,8 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
);
} else if (action is RemoveLabelFromEmailAction) {
mailboxDashBoardController.clearEmailUIAction();
if (_currentEmailId == null ||
action.emailId != _currentEmailId) {
final displayedEmailId = _currentEmailId ?? currentEmail?.id;
if (displayedEmailId == null || action.emailId != displayedEmailId) {
return;
}
mailboxDashBoardController.toggleLabelToEmail(
@@ -355,8 +355,8 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
);
} else if (action is SyncUpdateLabelForEmailOnMemory) {
mailboxDashBoardController.clearEmailUIAction();
if (_currentEmailId == null ||
action.emailId != _currentEmailId) {
final displayedEmailId = _currentEmailId ?? currentEmail?.id;
if (displayedEmailId == null || action.emailId != displayedEmailId) {
return;
}