From ced0f72fba212c4aaefc4838856bd78dc6330e99 Mon Sep 17 00:00:00 2001 From: Torsten Grote <t@grobox.de> Date: Tue, 4 Sep 2018 12:31:16 -0300 Subject: [PATCH] Fix progress feel over messages in Conversation view Unlike with many other lists, we are not clearing the list of private messages when restarting the activity. We still load the messages from the database and add them to the view. When there are no new message to add, the usual insert observers do not trigger and we do not call list.showData() although we should. Doing so removes the progress bar as soon as messages have been loaded. --- .../briar/android/contact/ConversationActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/briar-android/src/main/java/org/briarproject/briar/android/contact/ConversationActivity.java b/briar-android/src/main/java/org/briarproject/briar/android/contact/ConversationActivity.java index ce2e6f9b2b..38ed62ea7b 100644 --- a/briar-android/src/main/java/org/briarproject/briar/android/contact/ConversationActivity.java +++ b/briar-android/src/main/java/org/briarproject/briar/android/contact/ConversationActivity.java @@ -378,8 +378,8 @@ public class ConversationActivity extends BriarActivity textInputView.setSendButtonEnabled(true); List<ConversationItem> items = createItems(headers, introductions, invitations); - if (items.isEmpty()) list.showData(); - else adapter.addAll(items); + adapter.addAll(items); + list.showData(); // Scroll to the bottom list.scrollToPosition(adapter.getItemCount() - 1); } else { -- GitLab