mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 03:32:15 -05:00
catch IndexOutOfBoundsException when swiping away conversations
This commit is contained in:
parent
7e712d9d4c
commit
07c7f5bc08
@ -210,7 +210,11 @@ public class ConversationActivity extends XmppActivity
|
||||
View v = listView.getChildAt(0);
|
||||
final int top = (v == null) ? 0 : (v.getTop() - listView.getPaddingTop());
|
||||
|
||||
try {
|
||||
swipedConversation = listAdapter.getItem(position);
|
||||
} catch (IndexOutOfBoundsException e) {
|
||||
return null;
|
||||
}
|
||||
listAdapter.remove(swipedConversation);
|
||||
swipedConversation.markRead();
|
||||
xmppConnectionService.getNotificationService().clear(swipedConversation);
|
||||
|
Loading…
Reference in New Issue
Block a user