aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationActivity.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
index 79b2c5c9..eaed4e02 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
@@ -189,14 +189,13 @@ public class ConversationActivity extends XmppActivity
final int index = listView.getFirstVisiblePosition();
View v = listView.getChildAt(0);
+ final int top = (v == null) ? 0 : (v.getTop() - listView.getPaddingTop());
swipedConversation = listAdapter.getItem(position);
listAdapter.remove(swipedConversation);
swipedConversation.markRead();
xmppConnectionService.getNotificationService().clear(swipedConversation);
- final int top = (v == null) ? 0 : (v.getTop() - listView.getPaddingTop());
-
if (position == 0 && listAdapter.getCount() == 0) {
endConversation(swipedConversation, false, true);
return null;
@@ -221,8 +220,8 @@ public class ConversationActivity extends XmppActivity
.reInit(getSelectedConversation());
}
swipedConversation = null;
+ listAdapter.notifyDataSetChanged();
listView.setSelectionFromTop(index + (listView.getChildCount() < position ? 1 : 0), top);
-
}
@Override