Fixed restoring selected state

pull/154/head
M66B 6 years ago
parent 7a58605d50
commit e84d36914d

@ -3102,7 +3102,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
return message; return message;
} }
} }
Log.i("Item=" + null + " @Key" + key); Log.i("Item=" + null + " @Key=" + key);
return null; return null;
} }

@ -43,8 +43,8 @@ public class SelectionPredicateMessage extends SelectionTracker.SelectionPredica
AdapterMessage adapter = (AdapterMessage) recyclerView.getAdapter(); AdapterMessage adapter = (AdapterMessage) recyclerView.getAdapter();
TupleMessageEx message = adapter.getItemForKey(key); TupleMessageEx message = adapter.getItemForKey(key);
if (message == null) if (message == null) // happens when restoring state
return false; return true;
if (message.uid != null) if (message.uid != null)
return true; return true;
@ -59,8 +59,8 @@ public class SelectionPredicateMessage extends SelectionTracker.SelectionPredica
AdapterMessage adapter = (AdapterMessage) recyclerView.getAdapter(); AdapterMessage adapter = (AdapterMessage) recyclerView.getAdapter();
TupleMessageEx message = adapter.getItemAtPosition(position); TupleMessageEx message = adapter.getItemAtPosition(position);
if (message == null) if (message == null) // happens when restoring state
return false; return true;
if (message.uid != null) if (message.uid != null)
return true; return true;

Loading…
Cancel
Save