TF-3025 Avoid search results being reloaded when performing certain actions read/star/...
This commit is contained in:
@@ -4,6 +4,8 @@ import 'package:model/email/presentation_email.dart';
|
||||
|
||||
class SearchingState extends LoadingState {}
|
||||
|
||||
class RefreshingSearchState extends LoadingState {}
|
||||
|
||||
class SearchEmailSuccess extends UIState {
|
||||
final List<PresentationEmail> emailList;
|
||||
|
||||
|
||||
@@ -26,10 +26,15 @@ class SearchEmailInteractor {
|
||||
Set<Comparator>? sort,
|
||||
Filter? filter,
|
||||
Properties? properties,
|
||||
bool isRefreshChange = false,
|
||||
}
|
||||
) async* {
|
||||
try {
|
||||
yield Right(SearchingState());
|
||||
if (isRefreshChange) {
|
||||
yield Right(RefreshingSearchState());
|
||||
} else {
|
||||
yield Right(SearchingState());
|
||||
}
|
||||
|
||||
final emailList = await threadRepository.searchEmails(
|
||||
session,
|
||||
|
||||
Reference in New Issue
Block a user