diff --git a/lib/blocs/upload/limits.dart b/lib/blocs/upload/limits.dart index e62a8f559a..6dfb503c8b 100644 --- a/lib/blocs/upload/limits.dart +++ b/lib/blocs/upload/limits.dart @@ -6,7 +6,7 @@ final mobilePrivateFileSizeLimit = const GiB(10).size; final publicFileSafeSizeLimit = const GiB(5).size; -int computeBundleSizeLimit(bool isTurbo) => +int getBundleSizeLimit(bool isTurbo) => isTurbo ? turboBundleSizeLimit : d2nBundleSizeLimit; final d2nBundleSizeLimit = const GiB(65).size; diff --git a/lib/blocs/upload/models/upload_plan.dart b/lib/blocs/upload/models/upload_plan.dart index 3be9d2a07f..41a6c889cf 100644 --- a/lib/blocs/upload/models/upload_plan.dart +++ b/lib/blocs/upload/models/upload_plan.dart @@ -60,7 +60,7 @@ class UploadPlan { }) async { logger.i( 'Creating bundle handles from data item handles with a max number of files of $maxDataItemCount'); - final int maxBundleSize = computeBundleSizeLimit(useTurbo); + final int maxBundleSize = getBundleSizeLimit(useTurbo); final folderItems = await NextFitBundlePacker( maxBundleSize: maxBundleSize, diff --git a/lib/utils/upload_plan_utils.dart b/lib/utils/upload_plan_utils.dart index 87741a0a48..457aab1e44 100644 --- a/lib/utils/upload_plan_utils.dart +++ b/lib/utils/upload_plan_utils.dart @@ -85,7 +85,7 @@ class UploadPlanUtils { ? RevisionAction.uploadNewVersion : RevisionAction.create; - final bundleSizeLimit = computeBundleSizeLimit(useTurbo); + final bundleSizeLimit = getBundleSizeLimit(useTurbo); if (fileSize < bundleSizeLimit) { fileDataItemUploadHandles[fileEntity.id!] = FileDataItemUploadHandle(