From 48f2885cfc2300004cf6cca48bf328cbbae11c58 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Thu, 21 Oct 2010 20:49:36 +0000 Subject: [PATCH] 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" --- src/com/fsck/k9/activity/MessageList.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/com/fsck/k9/activity/MessageList.java b/src/com/fsck/k9/activity/MessageList.java index 6d8d124f2..2fafac600 100644 --- a/src/com/fsck/k9/activity/MessageList.java +++ b/src/com/fsck/k9/activity/MessageList.java @@ -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);