Fix when dettached
This commit is contained in:
parent
2805a86bc5
commit
b44a76a4d2
|
@ -131,7 +131,7 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On
|
|||
@Override
|
||||
public void run() {
|
||||
synchronized (lstHolders) {
|
||||
if( (mRecyclerView.getLayoutManager()) != null) {
|
||||
if( mRecyclerView != null && (mRecyclerView.getLayoutManager()) != null) {
|
||||
int firstPosition = ((LinearLayoutManager) mRecyclerView.getLayoutManager()).findFirstCompletelyVisibleItemPosition();
|
||||
int lastPosition = ((LinearLayoutManager) mRecyclerView.getLayoutManager()).findLastCompletelyVisibleItemPosition();
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
@Override
|
||||
public void run() {
|
||||
synchronized (lstHolders) {
|
||||
if( (mRecyclerView.getLayoutManager()) != null) {
|
||||
if( mRecyclerView != null && (mRecyclerView.getLayoutManager()) != null) {
|
||||
int firstPosition = ((LinearLayoutManager) mRecyclerView.getLayoutManager()).findFirstCompletelyVisibleItemPosition();
|
||||
int lastPosition = ((LinearLayoutManager) mRecyclerView.getLayoutManager()).findLastCompletelyVisibleItemPosition();
|
||||
for (ViewHolder holder : lstHolders) {
|
||||
|
|
Loading…
Reference in New Issue