TF-1708 Update props properties for all state object in interactor
(cherry picked from commit 2a5441c2ef4facf28e7e6e1678e89601d72259be)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import 'package:core/core.dart';
|
||||
import 'package:core/presentation/state/failure.dart';
|
||||
import 'package:tmail_ui_user/features/base/state/ui_action_state.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/state.dart' as jmap;
|
||||
|
||||
@@ -8,16 +8,9 @@ class EmptyTrashFolderSuccess extends UIActionState {
|
||||
jmap.State? currentEmailState,
|
||||
jmap.State? currentMailboxState,
|
||||
}) : super(currentEmailState, currentMailboxState);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
|
||||
class EmptyTrashFolderFailure extends FeatureFailure {
|
||||
final dynamic exception;
|
||||
|
||||
EmptyTrashFolderFailure(this.exception);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [exception];
|
||||
EmptyTrashFolderFailure(dynamic exception) : super(exception: exception);
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
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/core/state.dart';
|
||||
import 'package:model/model.dart';
|
||||
import 'package:model/email/presentation_email.dart';
|
||||
|
||||
class GetAllEmailSuccess extends UIState {
|
||||
final List<PresentationEmail> emailList;
|
||||
@@ -13,10 +14,6 @@ class GetAllEmailSuccess extends UIState {
|
||||
}
|
||||
|
||||
class GetAllEmailFailure extends FeatureFailure {
|
||||
final dynamic exception;
|
||||
|
||||
GetAllEmailFailure(this.exception);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [exception];
|
||||
GetAllEmailFailure(dynamic exception) : super(exception: exception);
|
||||
}
|
||||
@@ -14,10 +14,6 @@ class GetEmailByIdSuccess extends UIState {
|
||||
}
|
||||
|
||||
class GetEmailByIdFailure extends FeatureFailure {
|
||||
final dynamic exception;
|
||||
|
||||
GetEmailByIdFailure(this.exception);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [exception];
|
||||
GetEmailByIdFailure(dynamic exception) : super(exception: exception);
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:core/core.dart';
|
||||
import 'package:model/model.dart';
|
||||
import 'package:core/presentation/state/failure.dart';
|
||||
import 'package:core/presentation/state/success.dart';
|
||||
import 'package:model/email/presentation_email.dart';
|
||||
|
||||
class LoadMoreEmailsSuccess extends UIState {
|
||||
final List<PresentationEmail> emailList;
|
||||
@@ -11,10 +12,6 @@ class LoadMoreEmailsSuccess extends UIState {
|
||||
}
|
||||
|
||||
class LoadMoreEmailsFailure extends FeatureFailure {
|
||||
final dynamic exception;
|
||||
|
||||
LoadMoreEmailsFailure(this.exception);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [exception];
|
||||
LoadMoreEmailsFailure(dynamic exception) : super(exception: exception);
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:core/core.dart';
|
||||
import 'package:core/presentation/state/failure.dart';
|
||||
import 'package:core/presentation/state/success.dart';
|
||||
import 'package:model/email/read_actions.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/state.dart' as jmap;
|
||||
import 'package:tmail_ui_user/features/base/state/ui_action_state.dart';
|
||||
@@ -19,7 +20,7 @@ class MarkAsMultipleEmailReadAllSuccess extends UIActionState {
|
||||
) : super(currentEmailState, currentMailboxState);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [countMarkAsReadSuccess, readActions];
|
||||
List<Object?> get props => [countMarkAsReadSuccess, readActions, ...super.props];
|
||||
}
|
||||
|
||||
class MarkAsMultipleEmailReadAllFailure extends FeatureFailure {
|
||||
@@ -45,15 +46,14 @@ class MarkAsMultipleEmailReadHasSomeEmailFailure extends UIActionState {
|
||||
) : super(currentEmailState, currentMailboxState);
|
||||
|
||||
@override
|
||||
List<Object> get props => [countMarkAsReadSuccess, readActions];
|
||||
List<Object?> get props => [countMarkAsReadSuccess, readActions, ...super.props];
|
||||
}
|
||||
|
||||
class MarkAsMultipleEmailReadFailure extends FeatureFailure {
|
||||
final dynamic exception;
|
||||
final ReadActions readActions;
|
||||
|
||||
MarkAsMultipleEmailReadFailure(this.exception, this.readActions);
|
||||
MarkAsMultipleEmailReadFailure(this.readActions, dynamic exception) : super(exception: exception);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [exception, readActions];
|
||||
List<Object?> get props => [readActions, exception];
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:core/core.dart';
|
||||
import 'package:model/model.dart';
|
||||
import 'package:core/presentation/state/failure.dart';
|
||||
import 'package:core/presentation/state/success.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/state.dart' as jmap;
|
||||
import 'package:model/email/mark_star_action.dart';
|
||||
import 'package:tmail_ui_user/features/base/state/ui_action_state.dart';
|
||||
|
||||
class LoadingMarkAsStarMultipleEmailAll extends UIState {}
|
||||
@@ -19,7 +20,7 @@ class MarkAsStarMultipleEmailAllSuccess extends UIActionState {
|
||||
) : super(currentEmailState, currentMailboxState);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [countMarkStarSuccess, markStarAction];
|
||||
List<Object?> get props => [countMarkStarSuccess, markStarAction, ...super.props];
|
||||
}
|
||||
|
||||
class MarkAsStarMultipleEmailAllFailure extends FeatureFailure {
|
||||
@@ -45,15 +46,14 @@ class MarkAsStarMultipleEmailHasSomeEmailFailure extends UIActionState {
|
||||
) : super(currentEmailState, currentMailboxState);
|
||||
|
||||
@override
|
||||
List<Object> get props => [countMarkStarSuccess, markStarAction];
|
||||
List<Object?> get props => [countMarkStarSuccess, markStarAction, ...super.props];
|
||||
}
|
||||
|
||||
class MarkAsStarMultipleEmailFailure extends FeatureFailure {
|
||||
final dynamic exception;
|
||||
final MarkStarAction markStarAction;
|
||||
|
||||
MarkAsStarMultipleEmailFailure(this.exception, this.markStarAction);
|
||||
MarkAsStarMultipleEmailFailure(this.markStarAction, dynamic exception) : super(exception: exception);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [exception, markStarAction];
|
||||
List<Object?> get props => [markStarAction, exception];
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
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/core/state.dart' as jmap;
|
||||
import 'package:jmap_dart_client/jmap/mail/email/email.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart';
|
||||
@@ -36,7 +37,8 @@ class MoveMultipleEmailToMailboxAllSuccess extends UIActionState {
|
||||
destinationMailboxId,
|
||||
moveAction,
|
||||
emailActionType,
|
||||
destinationPath
|
||||
destinationPath,
|
||||
...super.props
|
||||
];
|
||||
}
|
||||
|
||||
@@ -78,17 +80,17 @@ class MoveMultipleEmailToMailboxHasSomeEmailFailure extends UIActionState {
|
||||
destinationMailboxId,
|
||||
moveAction,
|
||||
emailActionType,
|
||||
destinationPath
|
||||
destinationPath,
|
||||
...super.props
|
||||
];
|
||||
}
|
||||
|
||||
class MoveMultipleEmailToMailboxFailure extends FeatureFailure {
|
||||
final dynamic exception;
|
||||
final MoveAction moveAction;
|
||||
final EmailActionType emailActionType;
|
||||
|
||||
MoveMultipleEmailToMailboxFailure(this.exception, this.emailActionType, this.moveAction);
|
||||
MoveMultipleEmailToMailboxFailure(this.emailActionType, this.moveAction, dynamic exception) : super(exception: exception);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [exception, emailActionType, moveAction];
|
||||
List<Object?> get props => [emailActionType, moveAction, exception];
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
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/core/state.dart';
|
||||
import 'package:model/model.dart';
|
||||
import 'package:model/email/presentation_email.dart';
|
||||
|
||||
class RefreshChangesAllEmailSuccess extends UIState {
|
||||
final List<PresentationEmail> emailList;
|
||||
@@ -13,10 +14,6 @@ class RefreshChangesAllEmailSuccess extends UIState {
|
||||
}
|
||||
|
||||
class RefreshChangesAllEmailFailure extends FeatureFailure {
|
||||
final dynamic exception;
|
||||
|
||||
RefreshChangesAllEmailFailure(this.exception);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [exception];
|
||||
RefreshChangesAllEmailFailure(dynamic exception) : super(exception: exception);
|
||||
}
|
||||
@@ -1,14 +1,8 @@
|
||||
|
||||
import 'package:core/core.dart';
|
||||
import 'package:core/presentation/state/failure.dart';
|
||||
import 'package:core/presentation/state/success.dart';
|
||||
import 'package:model/email/presentation_email.dart';
|
||||
|
||||
class SearchingState extends UIState {
|
||||
|
||||
SearchingState();
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
class SearchingState extends UIState {}
|
||||
|
||||
class SearchEmailSuccess extends UIState {
|
||||
final List<PresentationEmail> emailList;
|
||||
@@ -20,10 +14,6 @@ class SearchEmailSuccess extends UIState {
|
||||
}
|
||||
|
||||
class SearchEmailFailure extends FeatureFailure {
|
||||
final dynamic exception;
|
||||
|
||||
SearchEmailFailure(this.exception);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [exception];
|
||||
SearchEmailFailure(dynamic exception) : super(exception: exception);
|
||||
}
|
||||
@@ -1,15 +1,8 @@
|
||||
|
||||
import 'package:core/core.dart';
|
||||
import 'package:core/presentation/state/failure.dart';
|
||||
import 'package:core/presentation/state/success.dart';
|
||||
import 'package:model/email/presentation_email.dart';
|
||||
|
||||
class SearchingMoreState extends UIState {
|
||||
|
||||
SearchingMoreState();
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
class SearchingMoreState extends UIState {}
|
||||
|
||||
class SearchMoreEmailSuccess extends UIState {
|
||||
final List<PresentationEmail> emailList;
|
||||
@@ -21,10 +14,6 @@ class SearchMoreEmailSuccess extends UIState {
|
||||
}
|
||||
|
||||
class SearchMoreEmailFailure extends FeatureFailure {
|
||||
final dynamic exception;
|
||||
|
||||
SearchMoreEmailFailure(this.exception);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [exception];
|
||||
SearchMoreEmailFailure(dynamic exception) : super(exception: exception);
|
||||
}
|
||||
@@ -55,7 +55,7 @@ class MarkAsMultipleEmailReadInteractor {
|
||||
currentMailboxState: currentMailboxState));
|
||||
}
|
||||
} catch (e) {
|
||||
yield Left(MarkAsMultipleEmailReadFailure(e, readAction));
|
||||
yield Left(MarkAsMultipleEmailReadFailure(readAction, e));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ class MarkAsStarMultipleEmailInteractor {
|
||||
currentEmailState: currentEmailState));
|
||||
}
|
||||
} catch (e) {
|
||||
yield Left(MarkAsStarMultipleEmailFailure(e, markStarAction));
|
||||
yield Left(MarkAsStarMultipleEmailFailure(markStarAction, e));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -59,7 +59,7 @@ class MoveMultipleEmailToMailboxInteractor {
|
||||
currentMailboxState: currentMailboxState));
|
||||
}
|
||||
} catch (e) {
|
||||
yield Left(MoveMultipleEmailToMailboxFailure(e, moveRequest.emailActionType, moveRequest.moveAction));
|
||||
yield Left(MoveMultipleEmailToMailboxFailure(moveRequest.emailActionType, moveRequest.moveAction, e));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user