Fix forward recipients error handling

This commit is contained in:
dab246
2025-08-26 00:50:03 +07:00
committed by Dat H. Pham
parent 5314116c76
commit cb9e38db44
15 changed files with 190 additions and 64 deletions
@@ -1,6 +1,7 @@
import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/state/success.dart';
import 'package:forward/forward/tmail_forward.dart';
import 'package:tmail_ui_user/features/manage_account/domain/state/update_forwarding_state.dart';
class AddRecipientsInForwardingSuccess extends UIState {
final TMailForward forward;
@@ -11,6 +12,14 @@ class AddRecipientsInForwardingSuccess extends UIState {
List<Object?> get props => [forward];
}
class AddRecipientsInForwardingSuccessWithSomeCaseFailure
extends UpdateForwardingCompleteWithSomeCaseFailure {
AddRecipientsInForwardingSuccessWithSomeCaseFailure(
super.forward,
super.exception,
);
}
class AddRecipientsInForwardingFailure extends FeatureFailure {
AddRecipientsInForwardingFailure(dynamic exception) : super(exception: exception);
@@ -1,6 +1,7 @@
import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/state/success.dart';
import 'package:forward/forward/tmail_forward.dart';
import 'package:tmail_ui_user/features/manage_account/domain/state/update_forwarding_state.dart';
class StartDeleteRecipientInForwarding extends UIState {}
@@ -13,6 +14,14 @@ class DeleteRecipientInForwardingSuccess extends UIState {
List<Object?> get props => [forward];
}
class DeleteRecipientInForwardingSuccessWithSomeCaseFailure
extends UpdateForwardingCompleteWithSomeCaseFailure {
DeleteRecipientInForwardingSuccessWithSomeCaseFailure(
super.forward,
super.exception,
);
}
class DeleteRecipientInForwardingFailure extends FeatureFailure {
DeleteRecipientInForwardingFailure(dynamic exception) : super(exception: exception);
@@ -1,6 +1,7 @@
import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/state/success.dart';
import 'package:forward/forward/tmail_forward.dart';
import 'package:tmail_ui_user/features/manage_account/domain/state/update_forwarding_state.dart';
class EditLocalCopyInForwardingSuccess extends UIState {
final TMailForward forward;
@@ -11,6 +12,14 @@ class EditLocalCopyInForwardingSuccess extends UIState {
List<Object?> get props => [forward];
}
class EditLocalCopyInForwardingSuccessWithSomeCaseFailure
extends UpdateForwardingCompleteWithSomeCaseFailure {
EditLocalCopyInForwardingSuccessWithSomeCaseFailure(
super.forward,
super.exception,
);
}
class EditLocalCopyInForwardingFailure extends FeatureFailure {
EditLocalCopyInForwardingFailure(dynamic exception) : super(exception: exception);
@@ -0,0 +1,12 @@
import 'package:core/presentation/state/failure.dart';
import 'package:forward/forward/tmail_forward.dart';
class UpdateForwardingCompleteWithSomeCaseFailure extends FeatureFailure {
final TMailForward forward;
UpdateForwardingCompleteWithSomeCaseFailure(this.forward, dynamic exception)
: super(exception: exception);
@override
List<Object?> get props => [forward, ...super.props];
}