TF-1809: Handle sync data from cache and network when get email contents
(cherry picked from commit 896059cd5b29c62c2cf34621fe35d7b23a54acf4)
This commit is contained in:
@@ -26,6 +26,22 @@ class GetEmailContentSuccess extends UIState {
|
||||
];
|
||||
}
|
||||
|
||||
class GetEmailContentFromCacheSuccess extends UIState {
|
||||
final String emailContentString;
|
||||
final List<Attachment> attachments;
|
||||
|
||||
GetEmailContentFromCacheSuccess(
|
||||
this.emailContentString,
|
||||
this.attachments,
|
||||
);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
emailContentString,
|
||||
attachments,
|
||||
];
|
||||
}
|
||||
|
||||
class GetEmailContentFailure extends FeatureFailure {
|
||||
final dynamic exception;
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
import 'package:core/presentation/state/failure.dart';
|
||||
import 'package:core/presentation/state/success.dart';
|
||||
import 'package:tmail_ui_user/features/email/domain/model/detailed_email.dart';
|
||||
|
||||
class GetOpenedEmailLoading extends UIState {}
|
||||
|
||||
class GetOpenedEmailSuccess extends UIState {
|
||||
final DetailedEmail detailedEmail;
|
||||
|
||||
GetOpenedEmailSuccess(this.detailedEmail);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [detailedEmail];
|
||||
}
|
||||
|
||||
class GetOpenedEmailFailure extends FeatureFailure {
|
||||
|
||||
GetOpenedEmailFailure(dynamic exception) : super(exception: exception);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [exception];
|
||||
}
|
||||
Reference in New Issue
Block a user