1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-11 12:05:06 -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:48:10 +00:00
parent 1421dcfbd3
commit 6249c4a81c

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