mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-07 10:40:11 -05:00
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:
parent
e8756af4f1
commit
48f2885cfc
@ -779,12 +779,21 @@ public class MessageList
|
|||||||
mController.listLocalMessages(mAccount, mFolderName, mAdapter.mListener);
|
mController.listLocalMessages(mAccount, mFolderName, mAdapter.mListener);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
new Thread()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
{
|
{
|
||||||
mAdapter.markAllMessagesAsDirty();
|
mAdapter.markAllMessagesAsDirty();
|
||||||
mController.listLocalMessagesSynchronous(mAccount, mFolderName, mAdapter.mListener);
|
mController.listLocalMessagesSynchronous(mAccount, mFolderName, mAdapter.mListener);
|
||||||
mAdapter.pruneDirtyMessages();
|
mAdapter.pruneDirtyMessages();
|
||||||
mAdapter.notifyDataSetChanged();
|
mAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.start();
|
||||||
|
}
|
||||||
mController.notifyAccountCancel(this, mAccount);
|
mController.notifyAccountCancel(this, mAccount);
|
||||||
|
|
||||||
MessagingController.getInstance(getApplication()).notifyAccountCancel(this, mAccount);
|
MessagingController.getInstance(getApplication()).notifyAccountCancel(this, mAccount);
|
||||||
|
Loading…
Reference in New Issue
Block a user