TF-2925 Fix change mailbox very quick when refreshing after any mail action make the message list is not showed correctly
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
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:jmap_dart_client/jmap/mail/mailbox/mailbox.dart';
|
||||
import 'package:model/email/presentation_email.dart';
|
||||
|
||||
class RefreshAllEmailLoading extends LoadingState {}
|
||||
@@ -10,11 +11,20 @@ class GetAllEmailLoading extends LoadingState {}
|
||||
class GetAllEmailSuccess extends UIState {
|
||||
final List<PresentationEmail> emailList;
|
||||
final State? currentEmailState;
|
||||
final MailboxId? currentMailboxId;
|
||||
|
||||
GetAllEmailSuccess({required this.emailList, this.currentEmailState});
|
||||
GetAllEmailSuccess({
|
||||
required this.emailList,
|
||||
this.currentEmailState,
|
||||
this.currentMailboxId,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [emailList, currentEmailState];
|
||||
List<Object?> get props => [
|
||||
emailList,
|
||||
currentEmailState,
|
||||
currentMailboxId,
|
||||
];
|
||||
}
|
||||
|
||||
class GetAllEmailFailure extends FeatureFailure {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
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:jmap_dart_client/jmap/mail/mailbox/mailbox.dart';
|
||||
import 'package:model/email/presentation_email.dart';
|
||||
|
||||
class RefreshChangesAllEmailLoading extends LoadingState {}
|
||||
@@ -8,11 +9,20 @@ class RefreshChangesAllEmailLoading extends LoadingState {}
|
||||
class RefreshChangesAllEmailSuccess extends UIState {
|
||||
final List<PresentationEmail> emailList;
|
||||
final State? currentEmailState;
|
||||
final MailboxId? currentMailboxId;
|
||||
|
||||
RefreshChangesAllEmailSuccess({required this.emailList, this.currentEmailState});
|
||||
RefreshChangesAllEmailSuccess({
|
||||
required this.emailList,
|
||||
this.currentEmailState,
|
||||
this.currentMailboxId
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [emailList, currentEmailState];
|
||||
List<Object?> get props => [
|
||||
emailList,
|
||||
currentEmailState,
|
||||
currentMailboxId
|
||||
];
|
||||
}
|
||||
|
||||
class RefreshChangesAllEmailFailure extends FeatureFailure {
|
||||
|
||||
Reference in New Issue
Block a user