TF-4050 refactor: move attachment preview & download logic to download controller
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import 'package:core/presentation/state/failure.dart';
|
||||
import 'package:core/presentation/state/success.dart';
|
||||
import 'package:dartz/dartz.dart';
|
||||
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';
|
||||
@@ -12,13 +15,13 @@ class DownloadUIAction extends UIAction {
|
||||
}
|
||||
|
||||
class UpdateAttachmentsViewStateAction extends DownloadUIAction {
|
||||
UpdateAttachmentsViewStateAction(this.blobId, this.success);
|
||||
UpdateAttachmentsViewStateAction(this.blobId, this.viewState);
|
||||
|
||||
final Id? blobId;
|
||||
final dynamic success;
|
||||
final Either<Failure, Success> viewState;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [blobId, success];
|
||||
List<Object?> get props => [blobId, viewState];
|
||||
}
|
||||
|
||||
class DownloadAttachmentsQuicklyAction extends DownloadUIAction {
|
||||
@@ -29,3 +32,12 @@ class DownloadAttachmentsQuicklyAction extends DownloadUIAction {
|
||||
@override
|
||||
List<Object?> get props => [attachment];
|
||||
}
|
||||
|
||||
class OpenMailtoLinkFromPreviewAttachmentAction extends DownloadUIAction {
|
||||
OpenMailtoLinkFromPreviewAttachmentAction(this.uri);
|
||||
|
||||
final Uri? uri;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [uri];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user