Avoid crashes
This commit is contained in:
parent
dd0c80118f
commit
c4c6f7995f
|
@ -1017,9 +1017,13 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
status.setFetchMore(false);
|
status.setFetchMore(false);
|
||||||
holder.fetch_more.setEnabled(false);
|
holder.fetch_more.setEnabled(false);
|
||||||
holder.fetch_more.setVisibility(View.GONE);
|
holder.fetch_more.setVisibility(View.GONE);
|
||||||
DisplayStatusFragment homeFragment = ((BaseMainActivity) context).getHomeFragment();
|
if( context instanceof BaseMainActivity) {
|
||||||
if (homeFragment != null)
|
DisplayStatusFragment homeFragment = ((BaseMainActivity) context).getHomeFragment();
|
||||||
homeFragment.fetchMore(status.getId());
|
if (homeFragment != null)
|
||||||
|
homeFragment.fetchMore(status.getId());
|
||||||
|
}else{
|
||||||
|
Toasty.error(context, context.getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue