From 3ad69c799dd52ec6449afa92d948d8e16b2194a1 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Sun, 27 Dec 2009 16:54:06 +0000 Subject: [PATCH] When listing off messages, make sure that our "refresh the list" fires, even if we didn't start off empty. This could have prevented updated messages from showing up --- src/com/fsck/k9/activity/MessageList.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/com/fsck/k9/activity/MessageList.java b/src/com/fsck/k9/activity/MessageList.java index 9b5386c83..af252b1f4 100644 --- a/src/com/fsck/k9/activity/MessageList.java +++ b/src/com/fsck/k9/activity/MessageList.java @@ -171,7 +171,7 @@ public class MessageList public void addMessages(List messages) { - boolean wasEmpty = mAdapter.messages.isEmpty(); + final boolean wasEmpty = mAdapter.messages.isEmpty(); for (final MessageInfoHolder message : messages) { @@ -196,17 +196,17 @@ public class MessageList } } - if (wasEmpty) + runOnUiThread(new Runnable() { - runOnUiThread(new Runnable() + public void run() { - public void run() + if (wasEmpty) { mListView.setSelection(0); - mAdapter.notifyDataSetChanged(); } - }); - } + mAdapter.notifyDataSetChanged(); + } + }); } private void sortMessages()