TF-4004 Add loading bar for email rule filter view
This commit is contained in:
@@ -2,6 +2,8 @@ import 'package:core/presentation/state/failure.dart';
|
||||
import 'package:core/presentation/state/success.dart';
|
||||
import 'package:rule_filter/rule_filter/tmail_rule.dart';
|
||||
|
||||
class GettingAllRules extends LoadingState {}
|
||||
|
||||
class GetAllRulesSuccess extends UIState {
|
||||
final List<TMailRule>? rules;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class GetAllRulesInteractor {
|
||||
|
||||
Stream<Either<Failure, Success>> execute(AccountId accountId) async* {
|
||||
try {
|
||||
yield Right<Failure, Success>(LoadingState());
|
||||
yield Right(GettingAllRules());
|
||||
final rulesResponse = await _ruleFilterRepository.getAllTMailRule(accountId);
|
||||
yield Right(GetAllRulesSuccess(rulesResponse));
|
||||
} catch (exception) {
|
||||
|
||||
Reference in New Issue
Block a user