TF-2628 [Part-2] Add attachment property to DownloadAttachmentForWebFailure & ViewAttachmentForWebFailure

This commit is contained in:
DatDang
2024-02-27 15:58:59 +07:00
committed by Dat H. Pham
parent ab8544c3ad
commit 6fe62cb068
6 changed files with 20 additions and 4 deletions
@@ -1,6 +1,7 @@
import 'dart:typed_data';
import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/state/success.dart';
import 'package:jmap_dart_client/jmap/core/id.dart';
import 'package:model/download/download_task_id.dart';
import 'package:model/email/attachment.dart';
@@ -56,9 +57,12 @@ class DownloadAttachmentForWebSuccess extends UIState {
class DownloadAttachmentForWebFailure extends FeatureFailure {
final DownloadTaskId? taskId;
final Id? attachmentBlobId;
DownloadAttachmentForWebFailure({
this.taskId, dynamic exception
required this.attachmentBlobId,
this.taskId,
dynamic exception
}) : super(exception: exception);
@override
@@ -19,5 +19,9 @@ class ViewAttachmentForWebSuccess extends DownloadAttachmentForWebSuccess {
}
class ViewAttachmentForWebFailure extends DownloadAttachmentForWebFailure {
ViewAttachmentForWebFailure({super.taskId, super.exception});
ViewAttachmentForWebFailure({
required super.attachmentBlobId,
super.taskId,
super.exception,
});
}