1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-24 02:12:15 -05:00

"Select all" now won't start selection mode when there are no messages

This commit is contained in:
cketti 2012-10-24 05:35:45 +02:00
parent 508e9e8aa6
commit 613ef6ced2

View File

@ -1810,6 +1810,11 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
private void setSelectionState(boolean selected) {
if (selected) {
mSelectedCount = mAdapter.getCount();
if (mSelectedCount == 0) {
// Nothing to do if there are no messages
return;
}
for (int i = 0, end = mSelectedCount; i < end; i++) {
mSelected.put(i, true);
}