mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -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,10 +1348,18 @@ public class MessageList
|
||||
boolean selected = (deltaX > 0);
|
||||
int position = mListView.pointToPosition((int)e1.getX(), (int)e1.getY());
|
||||
|
||||
((MessageInfoHolder) mAdapter.getItem(position)).selected = selected;
|
||||
mSelectedCount += (selected ? 1 : -1);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
toggleBatchButtons();
|
||||
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