author not shown bug (#3525)

This commit is contained in:
taakanksha 2020-03-16 19:16:36 +05:30 committed by GitHub
parent 1fd748f8e7
commit 9cb81fce8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -99,10 +99,8 @@ public class GridViewAdapter extends ArrayAdapter {
*/
private void setAuthorView(Media item, TextView author) {
if (!TextUtils.isEmpty(item.getCreator())) {
String uploadedByTemplate = getContext().getString(R.string.image_uploaded_by);
String uploadedBy = String.format(Locale.getDefault(), uploadedByTemplate, item.getCreator());
author.setText(uploadedBy);
author.setVisibility(View.VISIBLE);
author.setText(getContext().getString(R.string.image_uploaded_by, item.getCreator()));
} else {
author.setVisibility(View.GONE);
}