TF-2064 Handle limit storage to show warning banner
(cherry picked from commit 3e36cebd5cbe880f9832c62463e71979e15e1741)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import 'dart:core';
|
||||
|
||||
import 'package:core/core.dart';
|
||||
import 'package:core/presentation/state/failure.dart';
|
||||
import 'package:core/presentation/state/success.dart';
|
||||
import 'package:dartz/dartz.dart';
|
||||
import 'package:jmap_dart_client/jmap/account_id.dart';
|
||||
import 'package:tmail_ui_user/features/quotas/domain/repository/quotas_repository.dart';
|
||||
@@ -13,9 +12,9 @@ class GetQuotasInteractor {
|
||||
|
||||
Stream<Either<Failure, Success>> execute(AccountId accountId) async* {
|
||||
try {
|
||||
yield Right<Failure, Success>(LoadingState());
|
||||
final response = await quotasRepository.getQuotas(accountId);
|
||||
yield Right(GetQuotasSuccess(response.quotas, response.state));
|
||||
yield Right<Failure, Success>(GetQuotasLoading());
|
||||
final listQuotas = await quotasRepository.getQuotas(accountId);
|
||||
yield Right(GetQuotasSuccess(listQuotas));
|
||||
} catch (exception) {
|
||||
yield Left(GetQuotasFailure(exception));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user