When returning from a messageview to a messagelist do our listview

updates on a thread rather than on the main ui thread. it results
in the list blinking with old data, but that's still a better user
experience than "frozen"
This commit is contained in:
Jesse Vincent 2010-10-21 20:49:36 +00:00
parent e8756af4f1
commit 48f2885cfc
1 changed files with 13 additions and 4 deletions

View File

@ -780,10 +780,19 @@ public class MessageList
}
else
{
mAdapter.markAllMessagesAsDirty();
mController.listLocalMessagesSynchronous(mAccount, mFolderName, mAdapter.mListener);
mAdapter.pruneDirtyMessages();
mAdapter.notifyDataSetChanged();
new Thread()
{
@Override
public void run()
{
mAdapter.markAllMessagesAsDirty();
mController.listLocalMessagesSynchronous(mAccount, mFolderName, mAdapter.mListener);
mAdapter.pruneDirtyMessages();
mAdapter.notifyDataSetChanged();
}
}
.start();
}
mController.notifyAccountCancel(this, mAccount);