1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 19:52:17 -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:
Jesse Vincent 2010-10-11 19:47:41 +00:00
parent a44c942f2a
commit e8fd9683e6

View File

@ -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();
}