Skip to content

Commit

Permalink
LA-1355 Changed the condition to check max deposit size in upload req…
Browse files Browse the repository at this point in the history
…uest creation
  • Loading branch information
KhaledNjim authored and hoangdat committed Nov 22, 2024
1 parent 04551f1 commit fa2a3ea
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,15 @@ class UploadRequestCreationViewModel extends BaseViewModel {
var totalSizeOfFilesInByte;
if (_totalFileSizeSetting != null) {
final totalSizeOfFiles = int.tryParse(totalFileSizeController.text) ?? 0;
totalSizeOfFilesInByte = totalFileSizeTypeNotifier.value.toByte(totalSizeOfFiles);
totalSizeOfFilesInByte =
totalFileSizeTypeNotifier.value.toByte(totalSizeOfFiles);
final totalFileSizeConfig = _totalFileSizeSetting!.maxValue;
final totalFileSizeTypeConfig = _totalFileSizeSetting!.maxUnit.toFileSizeType();
final totalFileSizeTypeConfig =
_totalFileSizeSetting!.maxUnit.toFileSizeType();
final totalFileSizeConfigInBytes =
totalFileSizeTypeConfig.toByte(totalFileSizeConfig);
if (totalSizeOfFilesInByte <= 0 ||
(totalSizeOfFiles >= totalFileSizeConfig &&
maxFileSizeTypeNotifier.value == totalFileSizeTypeConfig)) {
(totalSizeOfFilesInByte > totalFileSizeConfigInBytes)) {
_appToast.showErrorToast(AppLocalizations.of(context)
.total_file_size_error(
totalFileSizeConfig, totalFileSizeTypeConfig.text));
Expand Down

0 comments on commit fa2a3ea

Please sign in to comment.