add null check
add checks for null. This happens after rotating the screen while is turned off
This commit is contained in:
parent
338893ded4
commit
21eb98a52c
1 changed files with 2 additions and 3 deletions
|
@ -159,7 +159,7 @@ public class MissionAdapter extends Adapter<ViewHolder> {
|
||||||
str = R.string.missions_header_pending;
|
str = R.string.missions_header_pending;
|
||||||
} else {
|
} else {
|
||||||
str = R.string.missions_header_finished;
|
str = R.string.missions_header_finished;
|
||||||
mClear.setVisible(true);
|
if (mClear != null) mClear.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
((ViewHolderHeader) view).header.setText(str);
|
((ViewHolderHeader) view).header.setText(str);
|
||||||
|
@ -437,7 +437,6 @@ public class MissionAdapter extends Adapter<ViewHolder> {
|
||||||
public void clearFinishedDownloads() {
|
public void clearFinishedDownloads() {
|
||||||
mDownloadManager.forgetFinishedDownloads();
|
mDownloadManager.forgetFinishedDownloads();
|
||||||
applyChanges();
|
applyChanges();
|
||||||
mClear.setVisible(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean handlePopupItem(@NonNull ViewHolderItem h, @NonNull MenuItem option) {
|
private boolean handlePopupItem(@NonNull ViewHolderItem h, @NonNull MenuItem option) {
|
||||||
|
@ -507,7 +506,7 @@ public class MissionAdapter extends Adapter<ViewHolder> {
|
||||||
mIterator.end();
|
mIterator.end();
|
||||||
|
|
||||||
checkEmptyMessageVisibility();
|
checkEmptyMessageVisibility();
|
||||||
mClear.setVisible(mIterator.hasFinishedMissions());
|
if (mClear != null) mClear.setVisible(mIterator.hasFinishedMissions());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void forceUpdate() {
|
public void forceUpdate() {
|
||||||
|
|
Loading…
Reference in a new issue