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:
parent
1b74c176a2
commit
3ad69c799d
@ -171,7 +171,7 @@ public class MessageList
|
|||||||
public void addMessages(List<MessageInfoHolder> messages)
|
public void addMessages(List<MessageInfoHolder> messages)
|
||||||
{
|
{
|
||||||
|
|
||||||
boolean wasEmpty = mAdapter.messages.isEmpty();
|
final boolean wasEmpty = mAdapter.messages.isEmpty();
|
||||||
for (final MessageInfoHolder message : messages)
|
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);
|
mListView.setSelection(0);
|
||||||
mAdapter.notifyDataSetChanged();
|
|
||||||
}
|
}
|
||||||
});
|
mAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sortMessages()
|
private void sortMessages()
|
||||||
|
Loading…
Reference in New Issue
Block a user