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) {
|
||||||
return app1.label.toString().compareToIgnoreCase(app2.label.toString());
|
if(app1.label != null && app2.label != null)
|
||||||
|
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,7 +89,8 @@ public class ReportFragment extends Fragment implements Updatable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onUpdateComplete() {
|
public void onUpdateComplete() {
|
||||||
onUpdateComplete(model);
|
if(model != null)
|
||||||
|
onUpdateComplete(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onUpdateComplete(ApplicationViewModel model) {
|
public void onUpdateComplete(ApplicationViewModel model) {
|
||||||
|
|
Loading…
Reference in New Issue