From 471ed7838a8ef3cbb0e13c2aa1c777ca66372247 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Sat, 14 Jun 2014 10:29:26 +0200 Subject: [PATCH] fixed #204 --- .../siacs/conversations/ui/ConversationFragment.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java index b5c5f592..098285e2 100644 --- a/src/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/eu/siacs/conversations/ui/ConversationFragment.java @@ -683,12 +683,16 @@ public class ConversationFragment extends Fragment { break; } } - for(Message message : this.conversation.getMessages()) { - if (!this.messageList.contains(message)) { - this.messageList.add(message); + if (this.conversation.getMessages().size() == 0) { + this.messageList.clear(); + } else { + for(Message message : this.conversation.getMessages()) { + if (!this.messageList.contains(message)) { + this.messageList.add(message); + } } + updateStatusMessages(); } - updateStatusMessages(); this.messageListAdapter.notifyDataSetChanged(); if (conversation.getMode() == Conversation.MODE_SINGLE) { if (messageList.size() >= 1) {