mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-30 13:12:25 -05:00
Optimize the new return-to-listview code. (Avoid a bug where we do far
too much work on first open of a message list)
This commit is contained in:
parent
a44c942f2a
commit
e8fd9683e6
@ -771,7 +771,6 @@ public class MessageList
|
||||
sortDateAscending = mController.isSortAscending(SORT_TYPE.SORT_DATE);
|
||||
|
||||
mController.addListener(mAdapter.mListener);
|
||||
mAdapter.markAllMessagesAsDirty();
|
||||
|
||||
if (mFolderName != null)
|
||||
{
|
||||
@ -781,7 +780,10 @@ public class MessageList
|
||||
}
|
||||
else
|
||||
{
|
||||
mAdapter.markAllMessagesAsDirty();
|
||||
mController.listLocalMessagesSynchronous(mAccount, mFolderName, mAdapter.mListener);
|
||||
mAdapter.pruneDirtyMessages();
|
||||
mAdapter.notifyDataSetChanged();
|
||||
}
|
||||
mController.notifyAccountCancel(this, mAccount);
|
||||
|
||||
@ -795,8 +797,6 @@ public class MessageList
|
||||
}
|
||||
|
||||
mHandler.refreshTitle();
|
||||
mAdapter.pruneDirtyMessages();
|
||||
mAdapter.notifyDataSetChanged();
|
||||
|
||||
restoreListState();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user