mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-30 13:12:25 -05:00
Fix a crash on swipe in the message list. Thanks to cketti.
Fixes issue 1054
This commit is contained in:
parent
08e570d40f
commit
c6058686b3
@ -1348,11 +1348,19 @@ public class MessageList
|
||||
boolean selected = (deltaX > 0);
|
||||
int position = mListView.pointToPosition((int)e1.getX(), (int)e1.getY());
|
||||
|
||||
((MessageInfoHolder) mAdapter.getItem(position)).selected = selected;
|
||||
if (position != AdapterView.INVALID_POSITION)
|
||||
{
|
||||
MessageInfoHolder msgInfoHolder = (MessageInfoHolder) mAdapter.getItem(position);
|
||||
|
||||
if (msgInfoHolder != null)
|
||||
{
|
||||
msgInfoHolder.selected = selected;
|
||||
mSelectedCount += (selected ? 1 : -1);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
toggleBatchButtons();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user