TF-2047 Inject binding html analyzer

(cherry picked from commit 3840e511567172a290886998037b17e2b88db9a5)
This commit is contained in:
dab246
2023-07-31 16:52:09 +07:00
committed by Dat Vu
parent f47c3198b6
commit 903b720b2e
9 changed files with 20 additions and 27 deletions
@@ -1,5 +1,4 @@
import 'package:core/core.dart';
import 'package:model/model.dart';
import 'package:model/email/email_content.dart';
import 'package:tmail_ui_user/features/email/data/datasource/html_datasource.dart';
import 'package:tmail_ui_user/features/email/data/local/html_analyzer.dart';
import 'package:tmail_ui_user/main/exceptions/exception_thrower.dart';
@@ -7,10 +6,9 @@ import 'package:tmail_ui_user/main/exceptions/exception_thrower.dart';
class HtmlDataSourceImpl extends HtmlDataSource {
final HtmlAnalyzer _htmlAnalyzer;
final DioClient _dioClient;
final ExceptionThrower _exceptionThrower;
HtmlDataSourceImpl(this._htmlAnalyzer, this._dioClient, this._exceptionThrower);
HtmlDataSourceImpl(this._htmlAnalyzer, this._exceptionThrower);
@override
Future<EmailContent> transformEmailContent(
@@ -22,7 +20,6 @@ class HtmlDataSourceImpl extends HtmlDataSource {
return await _htmlAnalyzer.transformEmailContent(
emailContent,
mapUrlDownloadCID,
_dioClient,
draftsEmail: draftsEmail
);
}).catchError(_exceptionThrower.throwException);