feat: Re-use AddLabelToEmailMixin for logic add label to email in EmailView

This commit is contained in:
dab246
2026-02-05 13:03:18 +07:00
committed by Dat H. Pham
parent f4ae94d47b
commit 432c482155
14 changed files with 443 additions and 263 deletions
@@ -669,7 +669,18 @@ class ThreadView extends GetWidget<ThreadController>
openBottomSheetContextMenu: dashboardController.openBottomSheetContextMenu,
openPopupMenu: dashboardController.openPopupMenuActionGroup,
onHandleEmailByActionType: controller.handleEmailActionType,
onSelectLabelAction: (label, isSelected) {},
onSelectLabelAction: (label, isSelected) {
final emailId = presentationEmail.id;
if (emailId == null) {
logWarning('ThreadView::onSelectLabelAction: Email id is null');
return;
}
dashboardController.toggleLabelToEmail(
emailId,
label,
isSelected,
);
},
),
);
}