TF-2064 Handle limit storage to show warning banner
(cherry picked from commit 3e36cebd5cbe880f9832c62463e71979e15e1741)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
|
||||
import 'package:core/utils/app_logger.dart';
|
||||
import 'package:jmap_dart_client/jmap/quotas/data_types.dart';
|
||||
import 'package:jmap_dart_client/jmap/quotas/quota.dart';
|
||||
|
||||
extension ListQuotasExtensions on List<Quota> {
|
||||
|
||||
Quota? get octetsQuota {
|
||||
try {
|
||||
return firstWhere((quota) => quota.resourceType == ResourceType.octets);
|
||||
} catch(e) {
|
||||
logError('ListQuotasExtensions::octetsQuota: Not found octets quota');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user