mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 13:53:54 +01:00
parent
3b7b6f91a2
commit
31c688860d
7 changed files with 89 additions and 0 deletions
|
|
@ -112,6 +112,8 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment {
|
|||
TextView coordinates;
|
||||
@BindView(R.id.mediaDetailuploadeddate)
|
||||
TextView uploadedDate;
|
||||
@BindView(R.id.mediaDetailDisc)
|
||||
TextView mediaDiscussion;
|
||||
@BindView(R.id.seeMore)
|
||||
TextView seeMore;
|
||||
@BindView(R.id.nominatedDeletionBanner)
|
||||
|
|
@ -341,6 +343,7 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment {
|
|||
license.setText(prettyLicense(media));
|
||||
coordinates.setText(prettyCoordinates(media));
|
||||
uploadedDate.setText(prettyUploadedDate(media));
|
||||
mediaDiscussion.setText(prettyDiscussion(media));
|
||||
|
||||
categoryNames.clear();
|
||||
categoryNames.addAll(media.getCategories());
|
||||
|
|
@ -502,6 +505,14 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment {
|
|||
return desc;
|
||||
}
|
||||
}
|
||||
private String prettyDiscussion(Media media) {
|
||||
String disc = media.getDiscussion().trim();
|
||||
if (disc.equals("")) {
|
||||
return getString(R.string.detail_discussion_empty);
|
||||
} else {
|
||||
return disc;
|
||||
}
|
||||
}
|
||||
|
||||
private String prettyLicense(Media media) {
|
||||
String licenseKey = media.getLicense();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue