TF-1923 Fix new email offline mode not working
(cherry picked from commit c1c48e93d50cb0ebbccaf11c3f4a975af640b63a)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import 'package:core/core.dart';
|
||||
import 'package:core/presentation/state/failure.dart';
|
||||
import 'package:core/presentation/state/success.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/email/email.dart';
|
||||
import 'package:model/model.dart';
|
||||
import 'package:model/email/attachment.dart';
|
||||
import 'package:model/email/email_content.dart';
|
||||
|
||||
class GetEmailContentLoading extends LoadingState {}
|
||||
|
||||
@@ -10,12 +12,12 @@ class GetEmailContentSuccess extends UIState {
|
||||
final List<Attachment> attachments;
|
||||
final Email? emailCurrent;
|
||||
|
||||
GetEmailContentSuccess(
|
||||
this.emailContents,
|
||||
this.emailContentsDisplayed,
|
||||
this.attachments,
|
||||
this.emailCurrent
|
||||
);
|
||||
GetEmailContentSuccess({
|
||||
required this.emailContents,
|
||||
required this.emailContentsDisplayed,
|
||||
required this.attachments,
|
||||
required this.emailCurrent
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
@@ -29,23 +31,25 @@ class GetEmailContentSuccess extends UIState {
|
||||
class GetEmailContentFromCacheSuccess extends UIState {
|
||||
final String emailContentString;
|
||||
final List<Attachment> attachments;
|
||||
final Email? emailCurrent;
|
||||
|
||||
GetEmailContentFromCacheSuccess(
|
||||
this.emailContentString,
|
||||
this.attachments,
|
||||
);
|
||||
GetEmailContentFromCacheSuccess({
|
||||
required this.emailContentString,
|
||||
required this.attachments,
|
||||
this.emailCurrent
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
emailContentString,
|
||||
attachments,
|
||||
emailCurrent,
|
||||
];
|
||||
}
|
||||
|
||||
class GetEmailContentFailure extends FeatureFailure {
|
||||
final dynamic exception;
|
||||
|
||||
GetEmailContentFailure(this.exception);
|
||||
GetEmailContentFailure(dynamic exception) : super(exception: exception);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [exception];
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
import 'package:core/core.dart';
|
||||
|
||||
class StoreDetailedEmailToCacheLoading extends UIState {}
|
||||
|
||||
class StoreDetailedEmailToCacheSuccess extends UIState {}
|
||||
|
||||
class StoreDetailedEmailToCacheFailure extends FeatureFailure {
|
||||
|
||||
StoreDetailedEmailToCacheFailure(dynamic exception) : super(exception: exception);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [exception];
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import 'package:core/core.dart';
|
||||
|
||||
class StoreNewEmailLoading extends UIState {}
|
||||
|
||||
class StoreNewEmailSuccess extends UIState {}
|
||||
|
||||
class StoreNewEmailFailure extends FeatureFailure {
|
||||
|
||||
StoreNewEmailFailure(dynamic exception) : super(exception: exception);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [exception];
|
||||
}
|
||||
Reference in New Issue
Block a user