Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checks items length #5360

Merged
merged 5 commits into from
Oct 23, 2023
Merged

checks items length #5360

merged 5 commits into from
Oct 23, 2023

Conversation

Shin0017
Copy link
Contributor

Description

some changes for #5314

check the length of items, if it is empty this app will return to the main activity after pressing the next button.
Tests performed

Tested ProdDebug on pixel 6 pro with API 33.

final List<UploadItem> uploadItems = repository.getUploads();
if (uploadItems.size()==0) {
view.showProgress(false);
view.showMessage("Upload Failed",R.color.color_error);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please show a more technically detailed error message, explaining what is the actual issue. It is OK if users do not understand it fully.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your review! I changed it to view.showMessage("An out-of-sync of the number of Upload Media Detail Fragment and upload items happens.",R.color.color_error);.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this?

"Internal error: Zero upload items received by the Upload Media Detail Fragment. Sorry, please upload again."

Please also add a comment saying that internationalisation is not needed because this is an internal error message.

Thanks!

Copy link
Contributor Author

@Shin0017 Shin0017 Oct 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea! I've completed it.

@@ -347,4 +354,5 @@ public void showSimilarImageFragment(String originalFilePath, String possibleFil
similarImageCoordinates
);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for new line here?

@nicolas-raoul nicolas-raoul merged commit 6c14163 into commons-app:main Oct 23, 2023
1 check passed
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.

None yet

2 participants