TF-3671 Fix all composer interaction are blocked without network (#3682)
This commit is contained in:
@@ -7,10 +7,13 @@ import 'package:tmail_ui_user/features/login/data/network/config/oidc_constant.d
|
||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||
|
||||
class AppConfig {
|
||||
const AppConfig._();
|
||||
|
||||
static const int defaultMinInputLengthAutocomplete = 3;
|
||||
static const int warningAttachmentFileSizeInMegabytes = 10;
|
||||
static const int defaultLimitAutocomplete = 8;
|
||||
|
||||
static const String envFileName = 'env.file';
|
||||
static const String appDashboardConfigurationPath = "configurations/app_dashboard.json";
|
||||
static const String appFCMConfigurationPath = "configurations/env.fcm";
|
||||
static const String iOSKeychainSharingGroupId = 'KUT463DS29.com.linagora.ios.teammail.shared';
|
||||
|
||||
@@ -11,17 +11,16 @@ import 'package:tmail_ui_user/main/utils/app_config.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class AppUtils {
|
||||
|
||||
static const String envFileName = 'env.file';
|
||||
const AppUtils._();
|
||||
|
||||
static Future<void> loadEnvFile() async {
|
||||
await dotenv.load(fileName: envFileName);
|
||||
await dotenv.load(fileName: AppConfig.envFileName);
|
||||
final mapEnvData = Map<String, String>.from(dotenv.env);
|
||||
try {
|
||||
await AppUtils.loadFcmConfigFileToEnv(currentMapEnvData: mapEnvData);
|
||||
await loadFcmConfigFileToEnv(currentMapEnvData: mapEnvData);
|
||||
} catch (e) {
|
||||
logError('AppUtils::loadEnvFile:loadFcmConfigFileToEnv: Exception = $e');
|
||||
await dotenv.load(fileName: envFileName);
|
||||
await dotenv.load(fileName: AppConfig.envFileName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
import 'package:core/utils/app_logger.dart';
|
||||
import 'package:html_editor_enhanced/utils/html_editor_constants.dart';
|
||||
import 'package:html_editor_enhanced/utils/html_editor_utils.dart';
|
||||
|
||||
class AssetPreloader {
|
||||
const AssetPreloader._();
|
||||
|
||||
static Future<void> preloadHtmlEditorAssets() async {
|
||||
try {
|
||||
await Future.wait([
|
||||
HtmlEditorUtils.loadAsset(HtmlEditorConstants.summernoteHtmlAssetPath),
|
||||
HtmlEditorUtils.loadAsset(HtmlEditorConstants.jqueryAssetPath),
|
||||
HtmlEditorUtils.loadAsset(HtmlEditorConstants.summernoteCSSAssetPath),
|
||||
HtmlEditorUtils.loadAsset(HtmlEditorConstants.summernoteJSAssetPath),
|
||||
HtmlEditorUtils.loadAsset(HtmlEditorConstants.summernoteFontEOTAssetPath),
|
||||
HtmlEditorUtils.loadAsset(HtmlEditorConstants.summernoteFontTTFAssetPath),
|
||||
]);
|
||||
} catch (e) {
|
||||
logError('AssetPreloader::preloadHtmlEditorAssets:Exception = $e');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user