1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 19:52:17 -05:00

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
This commit is contained in:
Jesse Vincent 2009-12-27 16:54:06 +00:00
parent 1b74c176a2
commit 3ad69c799d

View File

@ -171,7 +171,7 @@ public class MessageList
public void addMessages(List<MessageInfoHolder> 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()