mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -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:
parent
edc4281253
commit
ac6358ec5c
@ -117,7 +117,7 @@ public class MessageView extends K9Activity
|
|||||||
|
|
||||||
//Shall we use more threads? How often will the user move from non-fully-downloaded
|
//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?
|
//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()
|
private DateFormat getDateFormat()
|
||||||
{
|
{
|
||||||
@ -486,17 +486,13 @@ public class MessageView extends K9Activity
|
|||||||
if (previous_scrolling != null)
|
if (previous_scrolling != null)
|
||||||
previous_scrolling.setEnabled(mPreviousMessageUid != null);
|
previous_scrolling.setEnabled(mPreviousMessageUid != null);
|
||||||
|
|
||||||
Runnable loaderThread = new Runnable() {
|
MessagingController.getInstance(getApplication()).loadMessageForView(
|
||||||
public void run() {
|
|
||||||
MessagingController.getInstance(getApplication()).loadMessageForViewSynchronous(
|
|
||||||
mAccount,
|
mAccount,
|
||||||
mFolder,
|
mFolder,
|
||||||
mMessageUid,
|
mMessageUid,
|
||||||
null);
|
null);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
threadPool.execute(loaderThread);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -539,12 +535,12 @@ public class MessageView extends K9Activity
|
|||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
clearFormats();
|
clearFormats();
|
||||||
MessagingController.getInstance(getApplication()).addListener(mListener);
|
//MessagingController.getInstance(getApplication()).addListener(mListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
MessagingController.getInstance(getApplication()).removeListener(mListener);
|
//MessagingController.getInstance(getApplication()).removeListener(mListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onDelete() {
|
private void onDelete() {
|
||||||
|
Loading…
Reference in New Issue
Block a user