TF-4128 Separate download handling into independent class to decouple from views on web

This commit is contained in:
dab246
2025-10-28 16:44:40 +07:00
committed by Dat H. Pham
parent 832f8e1391
commit be8eaf6258
37 changed files with 955 additions and 1095 deletions
@@ -0,0 +1,31 @@
import 'package:jmap_dart_client/jmap/core/id.dart';
import 'package:model/email/attachment.dart';
import 'package:tmail_ui_user/features/base/action/ui_action.dart';
class DownloadUIAction extends UIAction {
static final idle = DownloadUIAction();
DownloadUIAction() : super();
@override
List<Object?> get props => [];
}
class UpdateAttachmentsViewStateAction extends DownloadUIAction {
UpdateAttachmentsViewStateAction(this.blobId, this.success);
final Id? blobId;
final dynamic success;
@override
List<Object?> get props => [blobId, success];
}
class DownloadAttachmentsQuicklyAction extends DownloadUIAction {
DownloadAttachmentsQuicklyAction(this.attachment);
final Attachment attachment;
@override
List<Object?> get props => [attachment];
}