TF-3334 Skip getting stored state in interactor when performing actions with email and mailbox
This commit is contained in:
@@ -1,17 +1,9 @@
|
||||
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;
|
||||
|
||||
class StartDeleteEmailPermanently extends UIState {}
|
||||
|
||||
class DeleteEmailPermanentlySuccess extends UIActionState {
|
||||
|
||||
DeleteEmailPermanentlySuccess({
|
||||
jmap.State? currentEmailState,
|
||||
jmap.State? currentMailboxState,
|
||||
}) : super(currentEmailState, currentMailboxState);
|
||||
}
|
||||
class DeleteEmailPermanentlySuccess extends UIState {}
|
||||
|
||||
class DeleteEmailPermanentlyFailure extends FeatureFailure {
|
||||
|
||||
|
||||
@@ -1,41 +1,27 @@
|
||||
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:tmail_ui_user/features/base/state/ui_action_state.dart';
|
||||
|
||||
class LoadingDeleteMultipleEmailsPermanentlyAll extends UIState {}
|
||||
|
||||
class DeleteMultipleEmailsPermanentlyAllSuccess extends UIActionState {
|
||||
class DeleteMultipleEmailsPermanentlyAllSuccess extends UIState {
|
||||
|
||||
List<EmailId> emailIds;
|
||||
|
||||
DeleteMultipleEmailsPermanentlyAllSuccess(
|
||||
this.emailIds,
|
||||
{
|
||||
jmap.State? currentEmailState,
|
||||
jmap.State? currentMailboxState,
|
||||
}
|
||||
) : super(currentEmailState, currentMailboxState);
|
||||
DeleteMultipleEmailsPermanentlyAllSuccess(this.emailIds);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [emailIds, ...super.props];
|
||||
List<Object?> get props => [emailIds];
|
||||
}
|
||||
|
||||
class DeleteMultipleEmailsPermanentlyHasSomeEmailFailure extends UIActionState {
|
||||
class DeleteMultipleEmailsPermanentlyHasSomeEmailFailure extends UIState {
|
||||
|
||||
List<EmailId> emailIds;
|
||||
|
||||
DeleteMultipleEmailsPermanentlyHasSomeEmailFailure(
|
||||
this.emailIds,
|
||||
{
|
||||
jmap.State? currentEmailState,
|
||||
jmap.State? currentMailboxState,
|
||||
}
|
||||
) : super(currentEmailState, currentMailboxState);
|
||||
DeleteMultipleEmailsPermanentlyHasSomeEmailFailure(this.emailIds);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [emailIds, ...super.props];
|
||||
List<Object?> get props => [emailIds];
|
||||
}
|
||||
|
||||
class DeleteMultipleEmailsPermanentlyAllFailure extends FeatureFailure {}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import 'package:core/presentation/state/failure.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/state.dart' as jmap;
|
||||
import 'package:core/presentation/state/success.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/email/email.dart';
|
||||
import 'package:model/email/read_actions.dart';
|
||||
import 'package:model/model.dart';
|
||||
import 'package:tmail_ui_user/features/base/state/ui_action_state.dart';
|
||||
import 'package:tmail_ui_user/features/email/domain/model/mark_read_action.dart';
|
||||
|
||||
class MarkAsEmailReadSuccess extends UIActionState {
|
||||
class MarkAsEmailReadSuccess extends UIState {
|
||||
final EmailId emailId;
|
||||
final ReadActions readActions;
|
||||
final MarkReadAction markReadAction;
|
||||
@@ -15,14 +13,10 @@ class MarkAsEmailReadSuccess extends UIActionState {
|
||||
this.emailId,
|
||||
this.readActions,
|
||||
this.markReadAction,
|
||||
{
|
||||
jmap.State? currentEmailState,
|
||||
jmap.State? currentMailboxState,
|
||||
}
|
||||
) : super(currentEmailState, currentMailboxState);
|
||||
);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [emailId, readActions, markReadAction, ...super.props];
|
||||
List<Object?> get props => [emailId, readActions, markReadAction];
|
||||
}
|
||||
|
||||
class MarkAsEmailReadFailure extends FeatureFailure {
|
||||
|
||||
@@ -1,21 +1,14 @@
|
||||
import 'package:core/presentation/state/failure.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/state.dart' as jmap;
|
||||
import 'package:core/presentation/state/success.dart';
|
||||
import 'package:model/email/mark_star_action.dart';
|
||||
import 'package:tmail_ui_user/features/base/state/ui_action_state.dart';
|
||||
|
||||
class MarkAsStarEmailSuccess extends UIActionState {
|
||||
class MarkAsStarEmailSuccess extends UIState {
|
||||
final MarkStarAction markStarAction;
|
||||
|
||||
MarkAsStarEmailSuccess(
|
||||
this.markStarAction,
|
||||
{
|
||||
jmap.State? currentEmailState,
|
||||
jmap.State? currentMailboxState,
|
||||
}
|
||||
) : super(currentEmailState, currentMailboxState);
|
||||
MarkAsStarEmailSuccess(this.markStarAction);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [markStarAction, ...super.props];
|
||||
List<Object?> get props => [markStarAction];
|
||||
}
|
||||
|
||||
class MarkAsStarEmailFailure extends FeatureFailure {
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
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';
|
||||
import 'package:model/model.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';
|
||||
|
||||
class LoadingMoveToMailbox extends UIState {}
|
||||
|
||||
class MoveToMailboxSuccess extends UIActionState {
|
||||
class MoveToMailboxSuccess extends UIState {
|
||||
final EmailId emailId;
|
||||
final MailboxId currentMailboxId;
|
||||
final MailboxId destinationMailboxId;
|
||||
@@ -25,10 +23,8 @@ class MoveToMailboxSuccess extends UIActionState {
|
||||
this.emailActionType,
|
||||
{
|
||||
this.destinationPath,
|
||||
jmap.State? currentEmailState,
|
||||
jmap.State? currentMailboxState,
|
||||
}
|
||||
) : super(currentEmailState, currentMailboxState);
|
||||
);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
@@ -38,7 +34,6 @@ class MoveToMailboxSuccess extends UIActionState {
|
||||
moveAction,
|
||||
emailActionType,
|
||||
destinationPath,
|
||||
...super.props
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,23 +1,16 @@
|
||||
import 'package:core/presentation/state/failure.dart';
|
||||
import 'package:core/presentation/state/success.dart';
|
||||
import 'package:email_recovery/email_recovery/email_recovery_action.dart';
|
||||
import 'package:tmail_ui_user/features/base/state/ui_action_state.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/state.dart' as jmap;
|
||||
|
||||
class RestoreDeletedMessageLoading extends LoadingState {}
|
||||
|
||||
class RestoreDeletedMessageSuccess extends UIActionState {
|
||||
class RestoreDeletedMessageSuccess extends UIState {
|
||||
final EmailRecoveryAction emailRecoveryAction;
|
||||
|
||||
RestoreDeletedMessageSuccess(
|
||||
this.emailRecoveryAction,
|
||||
{
|
||||
jmap.State? currentMailboxState,
|
||||
}
|
||||
) : super(null, currentMailboxState);
|
||||
RestoreDeletedMessageSuccess(this.emailRecoveryAction);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [emailRecoveryAction, ...super.props];
|
||||
List<Object?> get props => [emailRecoveryAction];
|
||||
}
|
||||
|
||||
class RestoreDeletedMessageFailure extends FeatureFailure {
|
||||
|
||||
@@ -1,27 +1,17 @@
|
||||
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:tmail_ui_user/features/base/state/ui_action_state.dart';
|
||||
import 'package:tmail_ui_user/features/email/domain/model/event_action.dart';
|
||||
|
||||
class StoreEventAttendanceStatusLoading extends LoadingState {}
|
||||
|
||||
class StoreEventAttendanceStatusSuccess extends UIActionState {
|
||||
class StoreEventAttendanceStatusSuccess extends UIState {
|
||||
|
||||
final EventActionType eventActionType;
|
||||
|
||||
StoreEventAttendanceStatusSuccess(
|
||||
this.eventActionType,
|
||||
{
|
||||
jmap.State? currentEmailState,
|
||||
jmap.State? currentMailboxState,
|
||||
}
|
||||
) : super(currentEmailState, currentMailboxState);
|
||||
StoreEventAttendanceStatusSuccess(this.eventActionType);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
eventActionType,
|
||||
...super.props];
|
||||
List<Object?> get props => [eventActionType];
|
||||
}
|
||||
|
||||
class StoreEventAttendanceStatusFailure extends FeatureFailure {
|
||||
|
||||
@@ -1,18 +1,9 @@
|
||||
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:tmail_ui_user/features/base/state/ui_action_state.dart';
|
||||
|
||||
class UnsubscribeEmailLoading extends LoadingState {}
|
||||
|
||||
class UnsubscribeEmailSuccess extends UIActionState {
|
||||
UnsubscribeEmailSuccess(
|
||||
{
|
||||
jmap.State? currentEmailState,
|
||||
jmap.State? currentMailboxState,
|
||||
}
|
||||
) : super(currentEmailState, currentMailboxState);
|
||||
}
|
||||
class UnsubscribeEmailSuccess extends UIState {}
|
||||
|
||||
class UnsubscribeEmailFailure extends FeatureFailure {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user