Skip to content

Commit

Permalink
TF-3178 Remove verify name not used in vacation
Browse files Browse the repository at this point in the history
  • Loading branch information
dab246 authored and hoangdat committed Nov 3, 2024
1 parent c8bc63e commit 2026d93
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import 'package:rich_text_composer/rich_text_composer.dart';
import 'package:rich_text_composer/views/commons/constants.dart';
import 'package:tmail_ui_user/features/base/base_controller.dart';
import 'package:tmail_ui_user/features/composer/presentation/controller/rich_text_web_controller.dart';
import 'package:tmail_ui_user/features/mailbox_creator/domain/model/verification/empty_name_validator.dart';
import 'package:tmail_ui_user/features/mailbox_creator/domain/state/verify_name_view_state.dart';
import 'package:tmail_ui_user/features/mailbox_creator/domain/usecases/verify_name_interactor.dart';
import 'package:tmail_ui_user/features/mailbox_creator/presentation/extensions/validator_failure_extension.dart';
import 'package:tmail_ui_user/features/manage_account/domain/state/get_all_vacation_state.dart';
import 'package:tmail_ui_user/features/manage_account/domain/state/update_vacation_state.dart';
import 'package:tmail_ui_user/features/manage_account/domain/usecases/get_all_vacation_interactor.dart';
Expand All @@ -32,7 +28,6 @@ class VacationController extends BaseController {

final GetAllVacationInteractor _getAllVacationInteractor;
final UpdateVacationInteractor _updateVacationInteractor;
final VerifyNameInteractor _verifyNameInteractor;
final RichTextWebController _richTextControllerForWeb;

final vacationPresentation = VacationPresentation.initialize().obs;
Expand All @@ -53,7 +48,6 @@ class VacationController extends BaseController {
VacationController(
this._getAllVacationInteractor,
this._updateVacationInteractor,
this._verifyNameInteractor,
this._richTextControllerForWeb
);

Expand Down Expand Up @@ -251,23 +245,6 @@ class VacationController extends BaseController {
}
}

String? _getErrorStringByInputValue(BuildContext context, String? inputValue) {
return _verifyNameInteractor.execute(inputValue, [EmptyNameValidator()]).fold(
(failure) {
if (failure is VerifyNameFailure) {
return failure.getMessageVacation(context);
} else {
return null;
}
},
(success) => null
);
}

void updateMessageBody(BuildContext context, String? value) {
errorMessageBody.value = _getErrorStringByInputValue(context, value);
}

void saveVacation(BuildContext context) async {
KeyboardUtils.hideKeyboard(context);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class VacationControllerBindings extends Bindings {
Get.put(VacationController(
Get.find<GetAllVacationInteractor>(),
Get.find<UpdateVacationInteractor>(),
Get.find<VerifyNameInteractor>(),
Get.find<RichTextWebController>(tag: VacationUtils.vacationTagName),
));
}
Expand Down

0 comments on commit 2026d93

Please sign in to comment.