TF-838 Implement State for Interactor
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
import 'package:core/core.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;
|
||||
|
||||
class CreateNewMailboxSuccess extends UIState {
|
||||
class CreateNewMailboxSuccess extends UIActionState {
|
||||
|
||||
final Mailbox newMailbox;
|
||||
|
||||
CreateNewMailboxSuccess(this.newMailbox);
|
||||
CreateNewMailboxSuccess(this.newMailbox, {
|
||||
jmap.State? currentEmailState,
|
||||
jmap.State? currentMailboxState,
|
||||
}) : super(currentEmailState, currentMailboxState);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [newMailbox];
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
import 'package:core/core.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.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 DeleteMultipleMailboxSuccess extends UIState {
|
||||
class DeleteMultipleMailboxSuccess extends UIActionState {
|
||||
|
||||
final MailboxId mailboxIdDeleted;
|
||||
|
||||
DeleteMultipleMailboxSuccess(this.mailboxIdDeleted);
|
||||
DeleteMultipleMailboxSuccess(this.mailboxIdDeleted, {
|
||||
jmap.State? currentEmailState,
|
||||
jmap.State? currentMailboxState,
|
||||
}) : super(currentEmailState, currentMailboxState);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [mailboxIdDeleted];
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import 'package:core/core.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 {
|
||||
|
||||
@@ -24,22 +26,34 @@ class UpdatingMarkAsMailboxReadState extends UIState {
|
||||
List<Object?> get props => [mailboxId, countRead, totalUnread];
|
||||
}
|
||||
|
||||
class MarkAsMailboxReadAllSuccess extends UIState {
|
||||
class MarkAsMailboxReadAllSuccess extends UIActionState {
|
||||
|
||||
final MailboxName mailboxName;
|
||||
|
||||
MarkAsMailboxReadAllSuccess(this.mailboxName);
|
||||
MarkAsMailboxReadAllSuccess(this.mailboxName,
|
||||
{
|
||||
jmap.State? currentEmailState,
|
||||
jmap.State? currentMailboxState,
|
||||
}
|
||||
) : super(currentMailboxState, currentEmailState);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [mailboxName];
|
||||
}
|
||||
|
||||
class MarkAsMailboxReadHasSomeEmailFailure extends UIState {
|
||||
class MarkAsMailboxReadHasSomeEmailFailure extends UIActionState {
|
||||
|
||||
final MailboxName mailboxName;
|
||||
final int countEmailsRead;
|
||||
|
||||
MarkAsMailboxReadHasSomeEmailFailure(this.mailboxName, this.countEmailsRead);
|
||||
MarkAsMailboxReadHasSomeEmailFailure(
|
||||
this.mailboxName,
|
||||
this.countEmailsRead,
|
||||
{
|
||||
jmap.State? currentEmailState,
|
||||
jmap.State? currentMailboxState,
|
||||
}
|
||||
) : super(currentMailboxState, currentEmailState);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [mailboxName, countEmailsRead];
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import 'package:core/core.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';
|
||||
import 'package:jmap_dart_client/jmap/core/state.dart' as jmap;
|
||||
|
||||
class MoveMailboxLoading extends UIState {
|
||||
|
||||
@@ -10,7 +12,7 @@ class MoveMailboxLoading extends UIState {
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
|
||||
class MoveMailboxSuccess extends UIState {
|
||||
class MoveMailboxSuccess extends UIActionState {
|
||||
|
||||
final MailboxId mailboxIdSelected;
|
||||
final MoveAction moveAction;
|
||||
@@ -24,9 +26,11 @@ class MoveMailboxSuccess extends UIState {
|
||||
{
|
||||
this.parentId,
|
||||
this.destinationMailboxId,
|
||||
this.destinationMailboxName
|
||||
this.destinationMailboxName,
|
||||
jmap.State? currentEmailState,
|
||||
jmap.State? currentMailboxState,
|
||||
}
|
||||
);
|
||||
) : super(currentEmailState, currentMailboxState);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
import 'package:core/core.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 RenameMailboxSuccess extends UIState {
|
||||
class RenameMailboxSuccess extends UIActionState {
|
||||
|
||||
RenameMailboxSuccess();
|
||||
RenameMailboxSuccess({
|
||||
jmap.State? currentEmailState,
|
||||
jmap.State? currentMailboxState,
|
||||
}) : super(currentEmailState, currentMailboxState);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
|
||||
Reference in New Issue
Block a user