TF-2215 Support communicating L18n to remote servers
Signed-off-by: dab246 <tdvu@linagora.com> (cherry picked from commit 21b69c6ac0bada69c63b87a17fc42c730ce12762)
This commit is contained in:
@@ -29,6 +29,7 @@ import 'package:tmail_ui_user/features/quotas/data/network/quotas_api.dart';
|
||||
import 'package:tmail_ui_user/features/session/data/network/session_api.dart';
|
||||
import 'package:tmail_ui_user/features/thread/data/network/thread_api.dart';
|
||||
import 'package:tmail_ui_user/main/exceptions/remote_exception_thrower.dart';
|
||||
import 'package:tmail_ui_user/main/localizations/locale_interceptor.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
class NetworkBindings extends Bindings {
|
||||
@@ -69,11 +70,13 @@ class NetworkBindings extends Bindings {
|
||||
Get.find<TokenOidcCacheManager>(),
|
||||
Get.find<AccountCacheManager>(),
|
||||
));
|
||||
Get.put(LocaleInterceptor());
|
||||
Get.find<Dio>().interceptors.add(Get.find<DynamicUrlInterceptors>());
|
||||
Get.find<Dio>().interceptors.add(Get.find<AuthorizationInterceptors>());
|
||||
if (kDebugMode) {
|
||||
Get.find<Dio>().interceptors.add(LogInterceptor(requestBody: true));
|
||||
}
|
||||
Get.find<Dio>().interceptors.add(Get.find<LocaleInterceptor>());
|
||||
}
|
||||
|
||||
void _bindingApi() {
|
||||
|
||||
@@ -14,6 +14,7 @@ import 'package:tmail_ui_user/features/mailbox/data/network/mailbox_isolate_work
|
||||
import 'package:tmail_ui_user/features/thread/data/network/thread_api.dart';
|
||||
import 'package:tmail_ui_user/features/thread/data/network/thread_isolate_worker.dart';
|
||||
import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
||||
import 'package:tmail_ui_user/main/localizations/locale_interceptor.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
import 'package:worker_manager/worker_manager.dart';
|
||||
|
||||
@@ -47,6 +48,7 @@ class NetworkIsolateBindings extends Bindings {
|
||||
if (kDebugMode) {
|
||||
dio.interceptors.add(LogInterceptor(requestBody: true));
|
||||
}
|
||||
dio.interceptors.add(Get.find<LocaleInterceptor>());
|
||||
}
|
||||
|
||||
void _bindingApi() {
|
||||
|
||||
Reference in New Issue
Block a user