Skip to content

Conversation

@Kota-Jagadeesh
Copy link
Collaborator

This version is enhanced from the initial proposal (#6555) and includes key refactorings:

  1. user-Friendly truncation (instead of Hard Block):
  • In UploadActivity.kt, the upload list is now checked for size after file processing.
  • If fileCount > 20, the list is immediately truncated to the MAX_EXTERNAL_UPLOAD_COUNT.

A non-blocking toast is shown to the user informing them that only the first 20 files were loaded, ensuring workflow continuity with clear feedback.

  1. Constant Centralization (Refactoring):
  • The hardcoded limit (20) was removed from CustomSelectorActivity.kt and centralized into a dedicated shared constant: fr.free.nrw.commons.filepicker.Constants.MAX_EXTERNAL_UPLOAD_COUNT.

Both UploadActivity.kt and CustomSelectorActivity.kt now correctly reference this centralized constant, improving code maintainability and adherence to DRY principles.

  1. New String Resource:
  • Added R.string.multiple_upload_limit_truncated_message to inform the user about the truncation.

@github-actions
Copy link

github-actions bot commented Nov 9, 2025

✅ Generated APK variants!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants