mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 09:08:49 -05:00
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:
parent
44e2857c3f
commit
e05784d41d
@ -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>();
|
||||
@ -2392,8 +2388,6 @@ public class MessageList
|
||||
mHandler.resetUnreadCount();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
public MessageInfoHolder getMessage(Message message)
|
||||
{
|
||||
return getMessage(message.makeMessageReference());
|
||||
|
Loading…
Reference in New Issue
Block a user