mirror of
https://github.com/linagora/tmail-flutter.git
synced 2026-12-05 16:08:46 +00:00
24 lines
745 B
Dart
24 lines
745 B
Dart
import 'package:core/core.dart';
|
|
import 'package:model/model.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';
|
|
|
|
class HtmlDataSourceImpl extends HtmlDataSource {
|
|
|
|
final HtmlAnalyzer _htmlAnalyzer;
|
|
final DioClient _dioClient;
|
|
|
|
HtmlDataSourceImpl(this._htmlAnalyzer, this._dioClient);
|
|
|
|
@override
|
|
Future<EmailContent> transformEmailContent(
|
|
EmailContent emailContent,
|
|
Map<String, String>? mapUrlDownloadCID
|
|
) {
|
|
return Future.sync(() async {
|
|
return await _htmlAnalyzer.transformEmailContent(emailContent, mapUrlDownloadCID, _dioClient);
|
|
}).catchError((error) {
|
|
throw error;
|
|
});
|
|
}
|
|
} |