1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-24 02:12:15 -05:00

svn merge -c 749 ../issue4-1.X .

ImapStore.ImapFolder is not thread-safe, so all access to the remote
folders must be done through the work processing of the
MessagingController.
This commit is contained in:
Daniel Applebaum 2009-09-15 04:28:37 +00:00
parent edc4281253
commit ac6358ec5c

View File

@ -117,7 +117,7 @@ public class MessageView extends K9Activity
//Shall we use more threads? How often will the user move from non-fully-downloaded
//messages to another non-fully-downloaded message more than 3 times?
private final ExecutorService threadPool = Executors.newFixedThreadPool(3);
// private final ExecutorService threadPool = Executors.newFixedThreadPool(3);
private DateFormat getDateFormat()
{
@ -486,17 +486,13 @@ public class MessageView extends K9Activity
if (previous_scrolling != null)
previous_scrolling.setEnabled(mPreviousMessageUid != null);
Runnable loaderThread = new Runnable() {
public void run() {
MessagingController.getInstance(getApplication()).loadMessageForViewSynchronous(
MessagingController.getInstance(getApplication()).loadMessageForView(
mAccount,
mFolder,
mMessageUid,
null);
}
};
threadPool.execute(loaderThread);
}
@ -539,12 +535,12 @@ public class MessageView extends K9Activity
public void onResume() {
super.onResume();
clearFormats();
MessagingController.getInstance(getApplication()).addListener(mListener);
//MessagingController.getInstance(getApplication()).addListener(mListener);
}
public void onPause() {
super.onPause();
MessagingController.getInstance(getApplication()).removeListener(mListener);
//MessagingController.getInstance(getApplication()).removeListener(mListener);
}
private void onDelete() {