Running heavy operations on the UI thread makes K-9's UI slow and

freezy.  addOrUpdateMessages is very heavy. and very common.
This commit is contained in:
Jesse Vincent 2010-10-21 20:48:12 +00:00
parent 44e2857c3f
commit e05784d41d
1 changed files with 0 additions and 6 deletions

View File

@ -2303,10 +2303,6 @@ public class MessageList
// the callbacks to mutate it.
final List<Message> messages = new ArrayList<Message>(providedMessages);
runOnUiThread(new Runnable()
{
public void run()
{
boolean needsSort = false;
final List<MessageInfoHolder> messagesToAdd = new ArrayList<MessageInfoHolder>();
List<MessageInfoHolder> messagesToRemove = new ArrayList<MessageInfoHolder>();
@ -2391,8 +2387,6 @@ public class MessageList
mHandler.sortMessages();
mHandler.resetUnreadCount();
}
}
});
}
public MessageInfoHolder getMessage(Message message)
{