TF-3698 Thread Detail Real time update

TF-3698 Thread Detail update reset RefreshThreadDetailAction position

TF-3698 Thread Detail refactor initializeThreadDetailEmails

TF-3698 Thread Detail refactor handleRefreshThreadDetailAction

TF-3698 Thread Detail create listThreadIds in ListEmailExtension
This commit is contained in:
DatDang
2025-05-27 11:03:28 +07:00
committed by Dat H. Pham
parent 1bc45e35f3
commit d210a892f2
28 changed files with 647 additions and 83 deletions
@@ -12,14 +12,27 @@ class GettingEmailsByIds extends LoadingState {
}
class GetEmailsByIdsSuccess extends UIState {
GetEmailsByIdsSuccess(this.presentationEmails);
GetEmailsByIdsSuccess(
this.presentationEmails, {
this.updateCurrentThreadDetail = false,
});
final List<PresentationEmail> presentationEmails;
final bool updateCurrentThreadDetail;
@override
List<Object?> get props => [presentationEmails];
List<Object?> get props => [presentationEmails, updateCurrentThreadDetail];
}
class GetEmailsByIdsFailure extends FeatureFailure {
GetEmailsByIdsFailure({super.exception, super.onRetry});
GetEmailsByIdsFailure({
super.exception,
super.onRetry,
required this.updateCurrentThreadDetail,
});
final bool updateCurrentThreadDetail;
@override
List<Object?> get props => [...super.props, updateCurrentThreadDetail];
}
@@ -2,17 +2,34 @@ import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/state/success.dart';
import 'package:jmap_dart_client/jmap/mail/email/email.dart';
class GettingThreadById extends LoadingState {}
class GettingThreadById extends LoadingState {
final bool updateCurrentThreadDetail;
GettingThreadById({this.updateCurrentThreadDetail = false});
@override
List<Object> get props => [updateCurrentThreadDetail];
}
class GetThreadByIdSuccess extends UIState {
final List<EmailId> emailIds;
final bool updateCurrentThreadDetail;
GetThreadByIdSuccess(this.emailIds);
GetThreadByIdSuccess(this.emailIds, {this.updateCurrentThreadDetail = false});
@override
List<Object> get props => [emailIds];
List<Object> get props => [emailIds, updateCurrentThreadDetail];
}
class GetThreadByIdFailure extends FeatureFailure {
GetThreadByIdFailure({super.exception, super.onRetry});
GetThreadByIdFailure({
super.exception,
super.onRetry,
required this.updateCurrentThreadDetail,
});
final bool updateCurrentThreadDetail;
@override
List<Object?> get props => [...super.props, updateCurrentThreadDetail];
}