Native rewrite #878
1 changed files with 9 additions and 7 deletions
|
@ -1628,10 +1628,10 @@ public class FileViewFragment extends BaseFragment implements
|
||||||
|
|
||||||
private void loadRelatedContent() {
|
private void loadRelatedContent() {
|
||||||
// reset the list view
|
// reset the list view
|
||||||
|
View root = getView();
|
||||||
|
if (claim != null && root != null) {
|
||||||
String title = claim.getTitle();
|
String title = claim.getTitle();
|
||||||
String claimId = claim.getClaimId();
|
String claimId = claim.getClaimId();
|
||||||
View root = getView();
|
|
||||||
if (root != null) {
|
|
||||||
ProgressBar relatedLoading = root.findViewById(R.id.file_view_related_content_progress);
|
ProgressBar relatedLoading = root.findViewById(R.id.file_view_related_content_progress);
|
||||||
Context context = getContext();
|
Context context = getContext();
|
||||||
boolean canShowMatureContent = false;
|
boolean canShowMatureContent = false;
|
||||||
|
@ -1665,13 +1665,15 @@ public class FileViewFragment extends BaseFragment implements
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
View view = getView();
|
View v = getView();
|
||||||
if (view != null) {
|
if (v != null) {
|
||||||
RecyclerView relatedContentList = view.findViewById(R.id.file_view_related_content_list);
|
RecyclerView relatedContentList = root.findViewById(R.id.file_view_related_content_list);
|
||||||
relatedContentList.setAdapter(relatedContentAdapter);
|
relatedContentList.setAdapter(relatedContentAdapter);
|
||||||
relatedContentAdapter.notifyDataSetChanged();
|
relatedContentAdapter.notifyDataSetChanged();
|
||||||
|
|
||||||
Helper.setViewVisibility(view.findViewById(R.id.file_view_no_related_content), relatedContentAdapter.getItemCount() == 0 ? View.VISIBLE : View.GONE);
|
Helper.setViewVisibility(
|
||||||
|
v.findViewById(R.id.file_view_no_related_content),
|
||||||
|
relatedContentAdapter == null || relatedContentAdapter.getItemCount() == 0 ? View.VISIBLE : View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue