TF-106 Fix display inlined image CIDs of emails
This commit is contained in:
@@ -25,14 +25,17 @@ class EmailBindings extends Bindings {
|
||||
void dependencies() {
|
||||
Get.lazyPut(() => EmailDataSourceImpl(Get.find<EmailAPI>()));
|
||||
Get.lazyPut<EmailDataSource>(() => Get.find<EmailDataSourceImpl>());
|
||||
Get.lazyPut(() => HtmlDataSourceImpl(Get.find<HtmlAnalyzer>()));
|
||||
Get.lazyPut(() => HtmlDataSourceImpl(
|
||||
Get.find<HtmlAnalyzer>(),
|
||||
Get.find<DioClient>()));
|
||||
Get.lazyPut<HtmlDataSource>(() => Get.find<HtmlDataSourceImpl>());
|
||||
Get.lazyPut(() => EmailRepositoryImpl(
|
||||
Get.find<EmailDataSource>(),
|
||||
Get.find<HtmlDataSource>()));
|
||||
Get.lazyPut<EmailRepository>(() => Get.find<EmailRepositoryImpl>());
|
||||
Get.put(SendEmailInteractor(Get.find<EmailRepository>()));
|
||||
Get.lazyPut(() => GetEmailContentInteractor(Get.find<EmailRepository>()));
|
||||
Get.lazyPut(() => GetEmailContentInteractor(
|
||||
Get.find<EmailRepository>()));
|
||||
Get.lazyPut(() => MarkAsEmailReadInteractor(Get.find<EmailRepository>()));
|
||||
Get.lazyPut(() => CredentialRepositoryImpl(Get.find<SharedPreferences>()));
|
||||
Get.lazyPut<CredentialRepository>(() => Get.find<CredentialRepositoryImpl>());
|
||||
|
||||
@@ -88,7 +88,8 @@ class EmailController extends BaseController {
|
||||
}
|
||||
|
||||
void _getEmailContentAction(AccountId accountId, EmailId emailId) async {
|
||||
consumeState(_getEmailContentInteractor.execute(accountId, emailId));
|
||||
final baseDownloadUrl = mailboxDashBoardController.sessionCurrent?.getDownloadUrl();
|
||||
consumeState(_getEmailContentInteractor.execute(accountId, emailId, baseDownloadUrl));
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -11,7 +11,7 @@ import 'package:tmail_ui_user/features/email/presentation/widgets/app_bar_mail_w
|
||||
import 'package:tmail_ui_user/features/email/presentation/widgets/attachment_file_tile_builder.dart';
|
||||
import 'package:tmail_ui_user/features/email/presentation/widgets/attachments_place_holder_loading_widget.dart';
|
||||
import 'package:tmail_ui_user/features/email/presentation/widgets/bottom_bar_mail_widget_builder.dart';
|
||||
import 'package:tmail_ui_user/features/email/presentation/extensions/list_attachment_extension.dart';
|
||||
import 'package:model/extensions/list_attachment_extension.dart';
|
||||
import 'package:tmail_ui_user/features/email/presentation/widgets/email_content_item_builder.dart';
|
||||
import 'package:tmail_ui_user/features/email/presentation/widgets/email_content_place_holder_loading_widget.dart';
|
||||
import 'package:tmail_ui_user/features/email/presentation/widgets/sender_and_receiver_information_tile_builder.dart';
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
import 'package:model/model.dart';
|
||||
|
||||
extension ListAttachmentExtension on List<Attachment> {
|
||||
|
||||
num totalSize() {
|
||||
num totalSize = 0;
|
||||
forEach((attachment) {
|
||||
if (attachment.size != null) {
|
||||
totalSize += attachment.size!.value;
|
||||
}
|
||||
});
|
||||
return totalSize;
|
||||
}
|
||||
|
||||
List<Attachment> get attachmentsWithDispositionAttachment {
|
||||
return where((element) => element.disposition == ContentDisposition.attachment).toList();
|
||||
}
|
||||
|
||||
List<Attachment> get attachmentWithDispositionInlines {
|
||||
return where((element) => element.disposition == ContentDisposition.inline).toList();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user