Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][locker] Use dynamic file limit in usage card widget

AmanRajSinghMourya69c74b03df13
diff --git a/mobile/apps/locker/lib/ui/components/usage_card_widget.dart b/mobile/apps/locker/lib/ui/components/usage_card_widget.dart
index 66b9f6a79a..0d343cf803 100644
--- a/mobile/apps/locker/lib/ui/components/usage_card_widget.dart
+++ b/mobile/apps/locker/lib/ui/components/usage_card_widget.dart
@@ -8,7 +8,7 @@ import "package:locker/l10n/l10n.dart";
import "package:locker/states/user_details_state.dart";
class UsageCardWidget extends StatelessWidget {
- static const maxFileCount = 1000;
+ static const _defaultMaxFileCount = 100;
const UsageCardWidget({
super.key,
@@ -22,6 +22,8 @@ class UsageCardWidget extends StatelessWidget {
final userDetails = inheritedDetails?.userDetails;
final isCached = inheritedDetails?.isCached ?? false;
+ final maxFileCount =
+ userDetails?.getLockerFileLimit() ?? _defaultMaxFileCount;
final usedCount =
(userDetails is UserDetails && !isCached) ? userDetails.fileCount : 0;
final progress = maxFileCount > 0 ? usedCount / maxFileCount : 0.0;