TF-2644 Handle total size exceeded maximum size when drag & drop multiple file to composer

This commit is contained in:
dab246
2024-03-01 17:09:09 +07:00
committed by Dat H. Pham
parent d646a5b9e4
commit 145a49d728
54 changed files with 1140 additions and 800 deletions
@@ -1,46 +1,25 @@
import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/state/success.dart';
import 'package:model/upload/file_info.dart';
import 'package:tmail_ui_user/features/upload/domain/model/upload_attachment.dart';
class UploadAttachmentSuccess extends UIState {
final UploadAttachment uploadAttachment;
final bool isInline;
final bool fromFileShared;
UploadAttachmentSuccess(
this.uploadAttachment,
{
this.isInline = false,
this.fromFileShared = false,
}
);
UploadAttachmentSuccess(this.uploadAttachment);
@override
List<Object?> get props => [
uploadAttachment,
isInline,
fromFileShared,
];
List<Object?> get props => [uploadAttachment];
}
class UploadAttachmentFailure extends FeatureFailure {
final bool isInline;
final bool fromFileShared;
UploadAttachmentFailure(
dynamic exception,
{
this.isInline = false,
this.fromFileShared = false,
}
) : super(exception: exception);
final FileInfo fileInfo;
UploadAttachmentFailure(dynamic exception, this.fileInfo) : super(exception: exception);
@override
List<Object?> get props => [
isInline,
fromFileShared,
...super.props
];
List<Object?> get props => [...super.props, fileInfo];
}