TF-1708 Update props properties for all state object in interactor

(cherry picked from commit 2a5441c2ef4facf28e7e6e1678e89601d72259be)
This commit is contained in:
dab246
2023-07-07 13:07:53 +07:00
committed by Dat Vu
parent 24d7eee69a
commit 0583406e3b
142 changed files with 348 additions and 1092 deletions
@@ -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/mail/mailbox/mailbox.dart';
import 'package:tmail_ui_user/features/base/state/ui_action_state.dart';
import 'package:jmap_dart_client/jmap/core/state.dart' as jmap;
@@ -15,14 +16,10 @@ class CreateNewMailboxSuccess extends UIActionState {
}) : super(currentEmailState, currentMailboxState);
@override
List<Object?> get props => [newMailbox];
List<Object?> get props => [newMailbox, ...super.props];
}
class CreateNewMailboxFailure extends FeatureFailure {
final dynamic exception;
CreateNewMailboxFailure(this.exception);
@override
List<Object?> get props => [exception];
CreateNewMailboxFailure(dynamic exception) : super(exception: exception);
}
@@ -16,7 +16,7 @@ class DeleteMultipleMailboxAllSuccess extends UIActionState {
}) : super(currentEmailState, currentMailboxState);
@override
List<Object?> get props => [listMailboxIdDeleted];
List<Object?> get props => [listMailboxIdDeleted, ...super.props];
}
class DeleteMultipleMailboxHasSomeSuccess extends UIActionState {
@@ -29,22 +29,12 @@ class DeleteMultipleMailboxHasSomeSuccess extends UIActionState {
}) : super(currentEmailState, currentMailboxState);
@override
List<Object?> get props => [listMailboxIdDeleted];
List<Object?> get props => [listMailboxIdDeleted, ...super.props];
}
class DeleteMultipleMailboxAllFailure extends FeatureFailure {
DeleteMultipleMailboxAllFailure();
@override
List<Object> get props => [];
}
class DeleteMultipleMailboxAllFailure extends FeatureFailure {}
class DeleteMultipleMailboxFailure extends FeatureFailure {
final dynamic exception;
DeleteMultipleMailboxFailure(this.exception);
@override
List<Object?> get props => [exception];
DeleteMultipleMailboxFailure(dynamic exception) : super(exception: exception);
}
@@ -16,10 +16,6 @@ class GetAllMailboxSuccess extends UIState {
}
class GetAllMailboxFailure extends FeatureFailure {
final dynamic exception;
GetAllMailboxFailure(this.exception);
@override
List<Object?> get props => [exception];
GetAllMailboxFailure(dynamic exception) : super(exception: exception);
}
@@ -1,15 +1,10 @@
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/mailbox/mailbox.dart';
import 'package:tmail_ui_user/features/base/state/ui_action_state.dart';
class MarkAsMailboxReadLoading extends UIState {
MarkAsMailboxReadLoading();
@override
List<Object?> get props => [];
}
class MarkAsMailboxReadLoading extends UIState {}
class UpdatingMarkAsMailboxReadState extends UIState {
@@ -38,7 +33,10 @@ class MarkAsMailboxReadAllSuccess extends UIActionState {
) : super(currentMailboxState, currentEmailState);
@override
List<Object?> get props => [mailboxDisplayName];
List<Object?> get props => [
mailboxDisplayName,
...super.props
];
}
class MarkAsMailboxReadHasSomeEmailFailure extends UIActionState {
@@ -56,22 +54,16 @@ class MarkAsMailboxReadHasSomeEmailFailure extends UIActionState {
) : super(currentMailboxState, currentEmailState);
@override
List<Object?> get props => [mailboxDisplayName, countEmailsRead];
List<Object?> get props => [
mailboxDisplayName,
countEmailsRead,
...super.props
];
}
class MarkAsMailboxReadAllFailure extends FeatureFailure {
MarkAsMailboxReadAllFailure();
@override
List<Object?> get props => [];
}
class MarkAsMailboxReadAllFailure extends FeatureFailure {}
class MarkAsMailboxReadFailure extends FeatureFailure {
final dynamic exception;
MarkAsMailboxReadFailure(this.exception);
@override
List<Object?> get props => [exception];
MarkAsMailboxReadFailure(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:jmap_dart_client/jmap/mail/mailbox/mailbox.dart';
import 'package:tmail_ui_user/features/base/state/ui_action_state.dart';
import 'package:tmail_ui_user/features/email/domain/model/move_action.dart';
@@ -40,7 +41,4 @@ class MoveMailboxSuccess extends UIActionState {
class MoveMailboxFailure extends FeatureFailure {
MoveMailboxFailure(dynamic exception) : super(exception: exception);
@override
List<Object?> get props => [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';
import 'package:model/mailbox/presentation_mailbox.dart';
@@ -16,10 +17,6 @@ class RefreshChangesAllMailboxSuccess extends UIState {
}
class RefreshChangesAllMailboxFailure extends FeatureFailure {
final dynamic exception;
RefreshChangesAllMailboxFailure(this.exception);
@override
List<Object?> get props => [exception];
RefreshChangesAllMailboxFailure(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:tmail_ui_user/features/base/state/ui_action_state.dart';
import 'package:jmap_dart_client/jmap/core/state.dart' as jmap;
@@ -10,16 +11,9 @@ class RenameMailboxSuccess extends UIActionState {
jmap.State? currentEmailState,
jmap.State? currentMailboxState,
}) : super(currentEmailState, currentMailboxState);
@override
List<Object?> get props => [];
}
class RenameMailboxFailure extends FeatureFailure {
final dynamic exception;
RenameMailboxFailure(this.exception);
@override
List<Object?> get props => [exception];
RenameMailboxFailure(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/mailbox/presentation_mailbox.dart';
class LoadingSearchMailbox extends UIState {}
@@ -14,10 +15,6 @@ class SearchMailboxSuccess extends UIState {
}
class SearchMailboxFailure extends FeatureFailure {
final dynamic exception;
SearchMailboxFailure(this.exception);
@override
List<Object?> get props => [exception];
SearchMailboxFailure(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:jmap_dart_client/jmap/mail/mailbox/mailbox.dart';
import 'package:tmail_ui_user/features/base/state/ui_action_state.dart';
import 'package:jmap_dart_client/jmap/core/state.dart' as jmap;
@@ -23,15 +24,11 @@ class SubscribeMailboxSuccess extends UIActionState {
List<Object?> get props => [
mailboxId,
subscribeAction,
super.props
...super.props
];
}
class SubscribeMailboxFailure extends FeatureFailure {
final dynamic exception;
SubscribeMailboxFailure(this.exception);
@override
List<Object> get props => [exception];
SubscribeMailboxFailure(dynamic exception) : super(exception: exception);
}
@@ -28,7 +28,7 @@ class SubscribeMultipleMailboxAllSuccess extends UIActionState {
parentMailboxId,
mailboxIdsSubscribe,
subscribeAction,
super.props
...super.props
];
}
@@ -53,23 +53,13 @@ class SubscribeMultipleMailboxHasSomeSuccess extends UIActionState {
parentMailboxId,
mailboxIdsSubscribe,
subscribeAction,
super.props
...super.props
];
}
class SubscribeMultipleMailboxAllFailure extends FeatureFailure {
SubscribeMultipleMailboxAllFailure();
@override
List<Object> get props => [];
}
class SubscribeMultipleMailboxAllFailure extends FeatureFailure {}
class SubscribeMultipleMailboxFailure extends FeatureFailure {
final dynamic exception;
SubscribeMultipleMailboxFailure(this.exception);
@override
List<Object> get props => [exception];
SubscribeMultipleMailboxFailure(dynamic exception) : super(exception: exception);
}