#3101: Add image upload limit of 20 to custom selector (#5369)

* Add basic image limit warning to custom selector

* Block upload button when image limit is exceeded

* Complete basic functionality for upload limit: Disabled button, warning sign & toast

* Consolidate functionality between upload limit and not for upload marking

* Upload Limit: write unit tests and optimize control flow

* Upload Limit Tests: improve logic coverage and alter to stay valid if limit is changed

* Upload Limit: polish javadocs and add explanation to warning toast.

* Upload Limit: refactor variable names

* Upload Limit: change warning toast to dialog box, repurposing welcome dialog code & layout

* Upload Limit: remove error icon when the mark as not for upload button is pressed
This commit is contained in:
u7469570 2023-11-20 20:13:05 +11:00 committed by GitHub
parent 3118a8368b
commit 60764f6f73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 216 additions and 51 deletions

View file

@ -716,6 +716,10 @@ Upload your first media by tapping on the add button.</string>
<string name="custom_selector_info_text2">Unlike the picture on the left, the picture on the right has the Commons logo indicating it is already uploaded. \n Touch and hold for image preview.</string>
<string name="welcome_custom_selector_ok">Awesome</string>
<string name="custom_selector_already_uploaded_image_text">This image has already been uploaded to Commons.</string>
<string name="custom_selector_over_limit_warning">For technical reasons, the app can\'t reliably upload more than %1$d pictures at once. The upload limit of %1$d has been exceeded by %2$d.</string>
<string name="custom_selector_dismiss_limit_warning_button_text">Dismiss</string>
<string name="custom_selector_button_limit_text">Max: %1$d</string>
<string name="custom_selector_limit_error_desc">Error: Upload Limit Exceeded</string>
<string name="place_state_wlm">WLM</string>
<string name="wlm_upload_info">This image will be entered into the Wiki Loves Monuments contest</string>
<string name="display_monuments">Display monuments</string>