mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-07 10:40:11 -05:00
when we go into a folder for the first time, jump to the first message being displayed rather than the widget at the end of the list
This commit is contained in:
parent
da8ad69366
commit
2c1dad5554
@ -212,6 +212,7 @@ public class MessageList
|
||||
|
||||
case MSG_ADD_MESSAGE:
|
||||
{
|
||||
boolean wasEmpty = mAdapter.messages.isEmpty();
|
||||
List<MessageInfoHolder> messages = (List<MessageInfoHolder>)((Object[]) msg.obj)[0];
|
||||
for (MessageInfoHolder message : messages)
|
||||
{
|
||||
@ -224,6 +225,9 @@ public class MessageList
|
||||
|
||||
mAdapter.messages.add(index, message);
|
||||
}
|
||||
|
||||
if (wasEmpty)
|
||||
mListView.setSelection(0);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user