[BUG] Remove HtmlMessagePurifier when not used

This commit is contained in:
dab246
2021-10-14 09:08:47 +07:00
committed by Dat H. Pham
parent d3bdd9c3e9
commit 8346e030c8
8 changed files with 5 additions and 409 deletions
@@ -73,7 +73,6 @@ class ComposerBindings extends Bindings {
Get.find<AppToast>(),
Get.find<Uuid>(),
Get.find<TextEditingController>(),
Get.find<HtmlMessagePurifier>(),
Get.find<LocalFilePickerInteractor>(),
Get.find<UploadMultipleAttachmentInteractor>()));
}
@@ -52,7 +52,6 @@ class ComposerController extends BaseController {
final AppToast _appToast;
final Uuid _uuid;
final TextEditingController subjectEmailInputController;
final HtmlMessagePurifier _htmlMessagePurifier;
final LocalFilePickerInteractor _localFilePickerInteractor;
final UploadMultipleAttachmentInteractor _uploadMultipleAttachmentInteractor;
@@ -73,7 +72,6 @@ class ComposerController extends BaseController {
this._appToast,
this._uuid,
this.subjectEmailInputController,
this._htmlMessagePurifier,
this._localFilePickerInteractor,
this._uploadMultipleAttachmentInteractor,
);
@@ -138,7 +136,7 @@ class ComposerController extends BaseController {
if (composerArguments.value != null
&& composerArguments.value!.emailActionType != EmailActionType.compose
&& Get.context != null) {
final contentEmailQuoted = _getBodyEmailQuotedAsHtml(Get.context!, _htmlMessagePurifier);
final contentEmailQuoted = _getBodyEmailQuotedAsHtml(Get.context!);
return contentEmailQuoted;
}
return '';
@@ -210,7 +208,7 @@ class ComposerController extends BaseController {
}
}
String _getBodyEmailQuotedAsHtml(BuildContext context, HtmlMessagePurifier htmlMessagePurifier) {
String _getBodyEmailQuotedAsHtml(BuildContext context) {
final headerEmailQuoted = getHeaderEmailQuoted(Localizations.localeOf(context).toLanguageTag());
final headerEmailQuotedAsHtml = headerEmailQuoted != null