diff --git a/lib/features/base/base_controller.dart b/lib/features/base/base_controller.dart index f69956a2d..cb361f087 100644 --- a/lib/features/base/base_controller.dart +++ b/lib/features/base/base_controller.dart @@ -60,9 +60,7 @@ abstract class BaseController extends GetxController messageError = error.message ?? error.type.value; } else { if (currentContext != null) { - messageError = AppLocalizations - .of(currentContext!) - .unknown_error_login_message; + messageError = AppLocalizations.of(currentContext!).unknownError; } } diff --git a/lib/features/composer/presentation/composer_controller.dart b/lib/features/composer/presentation/composer_controller.dart index c679252b8..ca1d4cb4f 100644 --- a/lib/features/composer/presentation/composer_controller.dart +++ b/lib/features/composer/presentation/composer_controller.dart @@ -281,18 +281,6 @@ class ComposerController extends BaseController { }); } - @override - void onError(error) { - if (currentOverlayContext != null && currentContext != null) { - _appToast.showToastWithIcon( - currentOverlayContext!, - textColor: AppColor.toastErrorBackgroundColor, - message: AppLocalizations.of(currentContext!).message_has_been_sent_failure, - icon: _imagePaths.icSendToast); - } - popBack(); - } - void _listenWorker() { uploadInlineImageWorker = ever(uploadController.uploadInlineViewState, (state) { log('ComposerController::_listenWorker(): $state'); diff --git a/lib/features/contact/presentation/contact_controller.dart b/lib/features/contact/presentation/contact_controller.dart index 96ee28373..3de76c3ac 100644 --- a/lib/features/contact/presentation/contact_controller.dart +++ b/lib/features/contact/presentation/contact_controller.dart @@ -196,7 +196,4 @@ class ContactController extends BaseController { @override void onDone() {} - - @override - void onError(error) {} } \ No newline at end of file diff --git a/lib/features/destination_picker/presentation/destination_picker_controller.dart b/lib/features/destination_picker/presentation/destination_picker_controller.dart index be8b4df03..68c9411ae 100644 --- a/lib/features/destination_picker/presentation/destination_picker_controller.dart +++ b/lib/features/destination_picker/presentation/destination_picker_controller.dart @@ -148,9 +148,6 @@ class DestinationPickerController extends BaseMailboxController { ); } - @override - void onError(error) {} - @override void onClose() { _disposeWidget(); diff --git a/lib/features/email/presentation/email_controller.dart b/lib/features/email/presentation/email_controller.dart index b3931b491..f6b18e0b1 100644 --- a/lib/features/email/presentation/email_controller.dart +++ b/lib/features/email/presentation/email_controller.dart @@ -262,11 +262,6 @@ class EmailController extends BaseController with AppLoaderMixin { }); } - @override - void onError(error) { - log('EmailController::onError(): $error'); - } - void _getEmailContentSuccess(GetEmailContentSuccess success) { emailContents.value = success.emailContentsDisplayed; initialEmailContents = success.emailContents; diff --git a/lib/features/emails_forward_creator/presentation/emails_forward_creator_controller.dart b/lib/features/emails_forward_creator/presentation/emails_forward_creator_controller.dart index af7f1ce01..6cbc5e428 100644 --- a/lib/features/emails_forward_creator/presentation/emails_forward_creator_controller.dart +++ b/lib/features/emails_forward_creator/presentation/emails_forward_creator_controller.dart @@ -59,9 +59,6 @@ class EmailsForwardCreatorController extends BaseController { @override void onDone() {} - @override - void onError(error) {} - @override void injectAutoCompleteBindings(Session? session, AccountId? accountId) { try { diff --git a/lib/features/identity_creator/presentation/identity_creator_controller.dart b/lib/features/identity_creator/presentation/identity_creator_controller.dart index 41877befd..e64f34700 100644 --- a/lib/features/identity_creator/presentation/identity_creator_controller.dart +++ b/lib/features/identity_creator/presentation/identity_creator_controller.dart @@ -132,9 +132,6 @@ class IdentityCreatorController extends BaseController { ); } - @override - void onError(error) {} - void _setUpValueFromIdentity() { _nameIdentity = identity?.name ?? ''; inputNameIdentityController?.text = identity?.name ?? ''; diff --git a/lib/features/login/presentation/base_login_view.dart b/lib/features/login/presentation/base_login_view.dart index 63eb65296..a8cf6c459 100644 --- a/lib/features/login/presentation/base_login_view.dart +++ b/lib/features/login/presentation/base_login_view.dart @@ -48,7 +48,7 @@ abstract class BaseLoginView extends GetWidget { } else if (failure is GetTokenOIDCFailure || failure is LoginCanNotGetTokenAction) { return AppLocalizations.of(context).canNotGetToken; } else { - return AppLocalizations.of(context).unknown_error_login_message; + return AppLocalizations.of(context).unknownError; } }, (success) { diff --git a/lib/features/login/presentation/login_controller.dart b/lib/features/login/presentation/login_controller.dart index 6a6a2abf6..2fec76de2 100644 --- a/lib/features/login/presentation/login_controller.dart +++ b/lib/features/login/presentation/login_controller.dart @@ -392,7 +392,4 @@ class LoginController extends ReloadableController { @override void onDone() {} - - @override - void onError(error) {} } \ No newline at end of file diff --git a/lib/features/mailbox/presentation/mailbox_controller.dart b/lib/features/mailbox/presentation/mailbox_controller.dart index 4b82c2f22..e027d3e91 100644 --- a/lib/features/mailbox/presentation/mailbox_controller.dart +++ b/lib/features/mailbox/presentation/mailbox_controller.dart @@ -190,9 +190,6 @@ class MailboxController extends BaseMailboxController { ); } - @override - void onError(error) {} - void _initWorker() { accountIdWorker = ever(mailboxDashBoardController.accountId, (accountId) { if (accountId is AccountId) { diff --git a/lib/features/mailbox_creator/presentation/mailbox_creator_controller.dart b/lib/features/mailbox_creator/presentation/mailbox_creator_controller.dart index 3508ed4b8..776e515b7 100644 --- a/lib/features/mailbox_creator/presentation/mailbox_creator_controller.dart +++ b/lib/features/mailbox_creator/presentation/mailbox_creator_controller.dart @@ -64,11 +64,7 @@ class MailboxCreatorController extends BaseController { } @override - void onDone() { - } - - @override - void onError(error) {} + void onDone() {} @override void onClose() { diff --git a/lib/features/mailbox_dashboard/presentation/controller/advanced_filter_controller.dart b/lib/features/mailbox_dashboard/presentation/controller/advanced_filter_controller.dart index 6129cf1b9..269ecc927 100644 --- a/lib/features/mailbox_dashboard/presentation/controller/advanced_filter_controller.dart +++ b/lib/features/mailbox_dashboard/presentation/controller/advanced_filter_controller.dart @@ -370,7 +370,4 @@ class AdvancedFilterController extends BaseController { @override void onDone() {} - - @override - void onError(error) {} } diff --git a/lib/features/mailbox_dashboard/presentation/controller/mailbox_dashboard_controller.dart b/lib/features/mailbox_dashboard/presentation/controller/mailbox_dashboard_controller.dart index d1d8986a3..bd41a0a24 100644 --- a/lib/features/mailbox_dashboard/presentation/controller/mailbox_dashboard_controller.dart +++ b/lib/features/mailbox_dashboard/presentation/controller/mailbox_dashboard_controller.dart @@ -278,9 +278,6 @@ class MailboxDashBoardController extends ReloadableController { ); } - @override - void onError(error) {} - void _registerPendingEmailAddress() { _emailReceiveManagerStreamSubscription = _emailReceiveManager.pendingEmailAddressInfo.stream.listen((emailAddress) { diff --git a/lib/features/mailbox_dashboard/presentation/controller/search_controller.dart b/lib/features/mailbox_dashboard/presentation/controller/search_controller.dart index 361b054b4..10dfa7bd5 100644 --- a/lib/features/mailbox_dashboard/presentation/controller/search_controller.dart +++ b/lib/features/mailbox_dashboard/presentation/controller/search_controller.dart @@ -241,9 +241,6 @@ class SearchController extends BaseController { @override void onDone() {} - @override - void onError(error) {} - @override void onClose() { searchInputController.dispose(); diff --git a/lib/features/manage_account/presentation/email_rules/email_rules_controller.dart b/lib/features/manage_account/presentation/email_rules/email_rules_controller.dart index 6692205a4..78557ec1d 100644 --- a/lib/features/manage_account/presentation/email_rules/email_rules_controller.dart +++ b/lib/features/manage_account/presentation/email_rules/email_rules_controller.dart @@ -69,9 +69,6 @@ class EmailRulesController extends BaseController { }); } - @override - void onError(error) {} - @override void onInit() { _getAllRules(); diff --git a/lib/features/manage_account/presentation/forward/forward_controller.dart b/lib/features/manage_account/presentation/forward/forward_controller.dart index 036fa9f68..af81185b0 100644 --- a/lib/features/manage_account/presentation/forward/forward_controller.dart +++ b/lib/features/manage_account/presentation/forward/forward_controller.dart @@ -83,9 +83,6 @@ class ForwardController extends BaseController { }); } - @override - void onError(error) {} - @override void onInit() { _getForward(); diff --git a/lib/features/manage_account/presentation/language_and_region/language_and_region_controller.dart b/lib/features/manage_account/presentation/language_and_region/language_and_region_controller.dart index b513b78b5..75eb548d5 100644 --- a/lib/features/manage_account/presentation/language_and_region/language_and_region_controller.dart +++ b/lib/features/manage_account/presentation/language_and_region/language_and_region_controller.dart @@ -33,9 +33,6 @@ class LanguageAndRegionController extends BaseController { }); } - @override - void onError(error) {} - void _setUpSupportedLanguages() { listSupportedLanguages.value = LocalizationService.supportedLocales; diff --git a/lib/features/manage_account/presentation/manage_account_dashboard_controller.dart b/lib/features/manage_account/presentation/manage_account_dashboard_controller.dart index ecf781066..f9f1460e2 100644 --- a/lib/features/manage_account/presentation/manage_account_dashboard_controller.dart +++ b/lib/features/manage_account/presentation/manage_account_dashboard_controller.dart @@ -84,10 +84,6 @@ class ManageAccountDashBoardController extends ReloadableController { ); } - @override - void onError(error) { - } - @override void handleReloaded(Session session) { accountId.value = session.accounts.keys.first; diff --git a/lib/features/manage_account/presentation/menu/manage_account_menu_controller.dart b/lib/features/manage_account/presentation/menu/manage_account_menu_controller.dart index 5f008fa51..b7c96445d 100644 --- a/lib/features/manage_account/presentation/menu/manage_account_menu_controller.dart +++ b/lib/features/manage_account/presentation/menu/manage_account_menu_controller.dart @@ -56,12 +56,7 @@ class ManageAccountMenuController extends BaseController { } @override - void onDone() { - } - - @override - void onError(error) { - } + void onDone() {} void selectAccountMenuItem(AccountMenuItem newAccountMenuItem) { dashBoardController.selectAccountMenuItem(newAccountMenuItem); diff --git a/lib/features/manage_account/presentation/profiles/identities/identities_controller.dart b/lib/features/manage_account/presentation/profiles/identities/identities_controller.dart index d4b865efc..9ef37033a 100644 --- a/lib/features/manage_account/presentation/profiles/identities/identities_controller.dart +++ b/lib/features/manage_account/presentation/profiles/identities/identities_controller.dart @@ -100,10 +100,6 @@ class IdentitiesController extends BaseController { ); } - @override - void onError(error) { - } - void _initWorker() { accountIdWorker = ever(_accountDashBoardController.accountId, (accountId) { if (accountId is AccountId) { diff --git a/lib/features/manage_account/presentation/profiles/profiles_controller.dart b/lib/features/manage_account/presentation/profiles/profiles_controller.dart index 935d49912..e7c4436db 100644 --- a/lib/features/manage_account/presentation/profiles/profiles_controller.dart +++ b/lib/features/manage_account/presentation/profiles/profiles_controller.dart @@ -4,10 +4,5 @@ import 'package:tmail_ui_user/features/base/base_controller.dart'; class ProfilesController extends BaseController { @override - void onDone() { - } - - @override - void onError(error) { - } + void onDone() {} } \ No newline at end of file diff --git a/lib/features/manage_account/presentation/vacation/vacation_controller.dart b/lib/features/manage_account/presentation/vacation/vacation_controller.dart index 7fc2df14f..ee805e5fc 100644 --- a/lib/features/manage_account/presentation/vacation/vacation_controller.dart +++ b/lib/features/manage_account/presentation/vacation/vacation_controller.dart @@ -91,9 +91,6 @@ class VacationController extends BaseController { ); } - @override - void onError(error) {} - void _initWorker() { vacationWorker = ever(_accountDashBoardController.vacationResponse, (vacation) { if (vacation is VacationResponse) { diff --git a/lib/features/network_status_handle/presentation/network_connnection_controller.dart b/lib/features/network_status_handle/presentation/network_connnection_controller.dart index 307f5d8c3..ef5c70a98 100644 --- a/lib/features/network_status_handle/presentation/network_connnection_controller.dart +++ b/lib/features/network_status_handle/presentation/network_connnection_controller.dart @@ -42,9 +42,6 @@ class NetworkConnectionController extends BaseController { @override void onDone() {} - @override - void onError(error) {} - void setNetworkConnectivityState(ConnectivityResult newConnectivityResult) { connectivityResult.value = newConnectivityResult; } diff --git a/lib/features/rules_filter_creator/presentation/rules_filter_creator_controller.dart b/lib/features/rules_filter_creator/presentation/rules_filter_creator_controller.dart index 24702cc0e..e561a5058 100644 --- a/lib/features/rules_filter_creator/presentation/rules_filter_creator_controller.dart +++ b/lib/features/rules_filter_creator/presentation/rules_filter_creator_controller.dart @@ -114,9 +114,6 @@ class RulesFilterCreatorController extends BaseMailboxController { }); } - @override - void onError(error) {} - void _setUpDefaultValueRuleFilter() { switch(actionType.value) { case CreatorActionType.create: diff --git a/lib/features/search/presentation/search_email_controller.dart b/lib/features/search/presentation/search_email_controller.dart index 8245d462a..748b8545e 100644 --- a/lib/features/search/presentation/search_email_controller.dart +++ b/lib/features/search/presentation/search_email_controller.dart @@ -146,9 +146,6 @@ class SearchEmailController extends BaseController @override void onDone() {} - @override - void onError(error) {} - void _initializeDebounceTimeTextSearchChange() { _deBouncerTime = Debouncer( const Duration(milliseconds: 500), diff --git a/lib/features/session/presentation/session_controller.dart b/lib/features/session/presentation/session_controller.dart index 9d9f69518..1b3286b1c 100644 --- a/lib/features/session/presentation/session_controller.dart +++ b/lib/features/session/presentation/session_controller.dart @@ -79,7 +79,7 @@ class SessionController extends ReloadableController { if (sessionException.message != null) { _appToast.showErrorToast('[${sessionException.code}] ${sessionException.message}'); } else { - _appToast.showErrorToast(AppLocalizations.of(currentContext!).unknown_error_login_message); + _appToast.showErrorToast(AppLocalizations.of(currentContext!).unknownError); } } } @@ -111,7 +111,4 @@ class SessionController extends ReloadableController { @override void onDone() {} - - @override - void onError(error) {} } \ No newline at end of file diff --git a/lib/l10n/intl_messages.arb b/lib/l10n/intl_messages.arb index 9e5b1a127..9fb7ba7e0 100644 --- a/lib/l10n/intl_messages.arb +++ b/lib/l10n/intl_messages.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2022-10-27T15:02:38.515955", + "@@last_modified": "2022-10-28T13:12:30.889722", "initializing_data": "Initializing data...", "@initializing_data": { "type": "text", @@ -108,8 +108,8 @@ "placeholders_order": [], "placeholders": {} }, - "unknown_error_login_message": "Unknown error occurred, please try again", - "@unknown_error_login_message": { + "unknownError": "Unknown error occurred, please try again", + "@unknownError": { "type": "text", "placeholders_order": [], "placeholders": {} diff --git a/lib/main/localizations/app_localizations.dart b/lib/main/localizations/app_localizations.dart index b0f3602b3..9f7670402 100644 --- a/lib/main/localizations/app_localizations.dart +++ b/lib/main/localizations/app_localizations.dart @@ -105,9 +105,9 @@ class AppLocalizations { return Intl.message('Multiple integrations', name: 'multipleIntegrations'); } - String get unknown_error_login_message { + String get unknownError { return Intl.message('Unknown error occurred, please try again', - name: 'unknown_error_login_message'); + name: 'unknownError'); } String get search_folder {