TF-4195 Fix comments of coderabbit

This commit is contained in:
dab246
2025-12-26 12:22:18 +07:00
committed by Dat H. Pham
parent 0076a7af57
commit e8b2c1d2a5
32 changed files with 235 additions and 146 deletions
@@ -71,6 +71,13 @@ class LabelController extends BaseController {
}
Future<void> openCreateNewLabelModal(AccountId? accountId) async {
if (accountId == null) {
consumeState(
Stream.value(Left(CreateNewLabelFailure(NotFoundAccountIdException()))),
);
return;
}
await DialogRouter().openDialogModal(
child: CreateNewLabelModal(
labels: labels,
@@ -80,13 +87,9 @@ class LabelController extends BaseController {
);
}
void _createNewLabel(AccountId? accountId, Label label) {
void _createNewLabel(AccountId accountId, Label label) {
log('LabelController::_createNewLabel:Label: $label');
if (accountId == null) {
consumeState(
Stream.value(Left(CreateNewLabelFailure(NotFoundAccountIdException()))),
);
} else if (_createNewLabelInteractor == null) {
if (_createNewLabelInteractor == null) {
consumeState(
Stream.value(Left(CreateNewLabelFailure(InteractorNotInitialized()))),
);
@@ -12,7 +12,7 @@ import 'package:tmail_ui_user/features/labels/presentation/widgets/label_item_co
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
import 'package:tmail_ui_user/main/routes/route_navigation.dart';
typedef OnAddLabelToEmailCallback = Function(
typedef OnAddLabelToEmailCallback = void Function(
EmailId emailId,
Label label,
bool isSelected,