TF-1205: remove android:hardwareAccelerated
This commit is contained in:
@@ -151,7 +151,7 @@ abstract class BaseController extends GetxController
|
||||
Future<void> injectFCMBindings(Session? session, AccountId? accountId) async {
|
||||
try {
|
||||
requireCapability(session!, accountId!, [capabilityPushNotification]);
|
||||
if(AppConfig.appFCMAvailable) {
|
||||
if(AppConfig.fcmAvailable) {
|
||||
await dotenv.load(fileName: AppConfig.appFCMConfigurationPath);
|
||||
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
|
||||
FCMBindings().dependencies();
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:tmail_ui_user/features/base/base_bindings.dart';
|
||||
import 'package:tmail_ui_user/features/caching/fcm_token_cache_client.dart';
|
||||
import 'package:tmail_ui_user/features/push_notification/data/datasource/fcm_datasource.dart';
|
||||
import 'package:tmail_ui_user/features/push_notification/data/datasource_impl/hive_fcm_datasource_impl.dart';
|
||||
import 'package:tmail_ui_user/features/push_notification/data/local/fcm_cache_manager.dart';
|
||||
import 'package:tmail_ui_user/features/push_notification/data/model/fcm_token_cache.dart';
|
||||
import 'package:tmail_ui_user/features/push_notification/data/repository/fcm_repository_impl.dart';
|
||||
import 'package:tmail_ui_user/features/push_notification/domain/repository/fcm_repository.dart';
|
||||
import 'package:tmail_ui_user/features/push_notification/domain/usecases/delete_fcm_token_cache_interactor.dart';
|
||||
@@ -11,6 +14,12 @@ import 'package:tmail_ui_user/features/push_notification/domain/usecases/save_fc
|
||||
import 'package:tmail_ui_user/main/exceptions/cache_exception_thrower.dart';
|
||||
|
||||
class FCMBindings extends BaseBindings {
|
||||
@override
|
||||
void dependencies() {
|
||||
_bindingsLocal();
|
||||
super.dependencies();
|
||||
}
|
||||
|
||||
@override
|
||||
void bindingsController() {}
|
||||
|
||||
@@ -43,4 +52,9 @@ class FCMBindings extends BaseBindings {
|
||||
void bindingsRepositoryImpl() {
|
||||
Get.put(FCMRepositoryImpl(Get.find<FCMDatasource>()));
|
||||
}
|
||||
|
||||
void _bindingsLocal() {
|
||||
Get.put(FCMCacheManager(Get.find<FcmTokenCacheClient>()));
|
||||
Hive.registerAdapter(FCMTokenCacheAdapter());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ import 'package:tmail_ui_user/features/login/data/local/oidc_configuration_cache
|
||||
import 'package:tmail_ui_user/features/login/data/local/token_oidc_cache_manager.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/data/local/mailbox_cache_manager.dart';
|
||||
import 'package:tmail_ui_user/features/manage_account/data/local/language_cache_manager.dart';
|
||||
import 'package:tmail_ui_user/features/push_notification/data/local/fcm_cache_manager.dart';
|
||||
import 'package:tmail_ui_user/features/thread/data/local/email_cache_manager.dart';
|
||||
import 'package:tmail_ui_user/main/exceptions/cache_exception_thrower.dart';
|
||||
|
||||
@@ -58,7 +57,6 @@ class LocalBindings extends Bindings {
|
||||
Get.put(RecentLoginUsernameCacheClient());
|
||||
Get.put(RecentLoginUsernameCacheManager(Get.find<RecentLoginUsernameCacheClient>()));
|
||||
Get.put(FcmTokenCacheClient());
|
||||
Get.put(FCMCacheManager(Get.find<FcmTokenCacheClient>()));
|
||||
Get.put(CachingManager(
|
||||
Get.find<MailboxCacheClient>(),
|
||||
Get.find<StateCacheClient>(),
|
||||
|
||||
@@ -12,7 +12,7 @@ class AppConfig {
|
||||
return false;
|
||||
}
|
||||
static String appDashboardConfigurationPath = "configurations/app_dashboard.json";
|
||||
static bool get appFCMAvailable {
|
||||
static bool get fcmAvailable {
|
||||
final supported = dotenv.get('FCM_AVAILABLE', fallback: 'unsupported');
|
||||
if (supported == 'supported') {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user