TF-438 Implement method for get/store/delete StateToRefresh and get email changes

This commit is contained in:
dab246
2022-11-24 14:30:58 +07:00
committed by Dat H. Pham
parent 17dde9366f
commit c1416c88fa
16 changed files with 428 additions and 2 deletions
@@ -0,0 +1,22 @@
import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/state/success.dart';
class DeleteEmailStateToRefreshLoading extends UIState {}
class DeleteEmailStateToRefreshSuccess extends UIState {
DeleteEmailStateToRefreshSuccess();
@override
List<Object> get props => [];
}
class DeleteEmailStateToRefreshFailure extends FeatureFailure {
final dynamic exception;
DeleteEmailStateToRefreshFailure(this.exception);
@override
List<Object> get props => [exception];
}
@@ -0,0 +1,25 @@
import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/state/success.dart';
import 'package:model/email/presentation_email.dart';
class GetEmailChangesToPushNotificationLoading extends UIState {}
class GetEmailChangesToPushNotificationSuccess extends UIState {
final List<PresentationEmail> emailList;
GetEmailChangesToPushNotificationSuccess(this.emailList);
@override
List<Object> get props => [emailList];
}
class GetEmailChangesToPushNotificationFailure extends FeatureFailure {
final dynamic exception;
GetEmailChangesToPushNotificationFailure(this.exception);
@override
List<Object> get props => [exception];
}
@@ -0,0 +1,25 @@
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;
class GetEmailStateToRefreshLoading extends UIState {}
class GetEmailStateToRefreshSuccess extends UIState {
final jmap.State storedState;
GetEmailStateToRefreshSuccess(this.storedState);
@override
List<Object> get props => [storedState];
}
class GetEmailStateToRefreshFailure extends FeatureFailure {
final dynamic exception;
GetEmailStateToRefreshFailure(this.exception);
@override
List<Object> get props => [exception];
}
@@ -0,0 +1,25 @@
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;
class GetStoredEmailDeliveryStateLoading extends UIState {}
class GetStoredEmailDeliveryStateSuccess extends UIState {
final jmap.State state;
GetStoredEmailDeliveryStateSuccess(this.state);
@override
List<Object> get props => [state];
}
class GetStoredEmailDeliveryStateFailure extends FeatureFailure {
final dynamic exception;
GetStoredEmailDeliveryStateFailure(this.exception);
@override
List<Object> get props => [exception];
}
@@ -0,0 +1,22 @@
import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/state/success.dart';
class StoreEmailDeliveryStateLoading extends UIState {}
class StoreEmailDeliveryStateSuccess extends UIState {
StoreEmailDeliveryStateSuccess();
@override
List<Object> get props => [];
}
class StoreEmailDeliveryStateFailure extends FeatureFailure {
final dynamic exception;
StoreEmailDeliveryStateFailure(this.exception);
@override
List<Object> get props => [exception];
}
@@ -0,0 +1,22 @@
import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/state/success.dart';
class StoreEmailStateToRefreshLoading extends UIState {}
class StoreEmailStateToRefreshSuccess extends UIState {
StoreEmailStateToRefreshSuccess();
@override
List<Object> get props => [];
}
class StoreEmailStateToRefreshFailure extends FeatureFailure {
final dynamic exception;
StoreEmailStateToRefreshFailure(this.exception);
@override
List<Object> get props => [exception];
}