TF-3699 Thread Detail Next previous actions (#3843)

This commit is contained in:
Dat Dang
2025-07-16 17:15:17 +07:00
committed by Dat H. Pham
parent 4d9a44df66
commit 7332b731dc
28 changed files with 581 additions and 241 deletions
@@ -13,16 +13,28 @@ class GettingThreadById extends LoadingState {
class GetThreadByIdSuccess extends UIState {
final List<EmailId> emailIds;
final ThreadId? threadId;
final bool updateCurrentThreadDetail;
final bool skipLoadingMetadata;
GetThreadByIdSuccess(this.emailIds, {this.updateCurrentThreadDetail = false});
GetThreadByIdSuccess(
this.emailIds, {
required this.threadId,
this.updateCurrentThreadDetail = false,
this.skipLoadingMetadata = false,
});
@override
List<Object> get props => [emailIds, updateCurrentThreadDetail];
List<Object?> get props => [
emailIds,
threadId,
updateCurrentThreadDetail,
skipLoadingMetadata,
];
}
class PreloadEmailIdsInThreadSuccess extends GetThreadByIdSuccess {
PreloadEmailIdsInThreadSuccess(super.emailIds);
PreloadEmailIdsInThreadSuccess(super.emailIds, {required super.threadId});
}
class GetThreadByIdFailure extends FeatureFailure {
@@ -38,6 +38,7 @@ class GetThreadByIdInteractor {
yield Right(GetThreadByIdSuccess(
result,
threadId: threadId,
updateCurrentThreadDetail: updateCurrentThreadDetail,
));
} catch (e) {