Try to Fix NullPointerException but not sure of the real cause need more investigation
This commit is contained in:
parent
35961d75a9
commit
73239c1328
|
@ -53,7 +53,14 @@ public class ApplicationListAdapter extends RecyclerView.Adapter {
|
||||||
private Comparator<ApplicationViewModel> alphaPackageComparator = new Comparator<ApplicationViewModel>() {
|
private Comparator<ApplicationViewModel> alphaPackageComparator = new Comparator<ApplicationViewModel>() {
|
||||||
@Override
|
@Override
|
||||||
public int compare(ApplicationViewModel app1, ApplicationViewModel app2) {
|
public int compare(ApplicationViewModel app1, ApplicationViewModel app2) {
|
||||||
|
if(app1.label != null && app2.label != null)
|
||||||
return app1.label.toString().compareToIgnoreCase(app2.label.toString());
|
return app1.label.toString().compareToIgnoreCase(app2.label.toString());
|
||||||
|
else if(app2.label != null)
|
||||||
|
return -1;
|
||||||
|
else if(app1.label != null)
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -89,6 +89,7 @@ public class ReportFragment extends Fragment implements Updatable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onUpdateComplete() {
|
public void onUpdateComplete() {
|
||||||
|
if(model != null)
|
||||||
onUpdateComplete(model);
|
onUpdateComplete(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue