1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-28 04:02:19 -05:00

Fixed issue 684: Only accept callbacks if the message uid of the callback is the same one we invoked the controller with.

This commit is contained in:
Bao-Long Nguyen-Trong 2009-10-18 03:30:42 +00:00
parent 4e2ba837aa
commit b8f4fdb882

View File

@ -1294,16 +1294,31 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
class Listener extends MessagingListener { class Listener extends MessagingListener {
@Override @Override
public void loadMessageForViewStarted(Account account, String folder, String uid) { public void loadMessageForViewStarted(Account account, String folder, String uid) {
if (mSourceMessageUid==null
|| !mSourceMessageUid.equals(uid)) {
return;
}
mHandler.sendEmptyMessage(MSG_PROGRESS_ON); mHandler.sendEmptyMessage(MSG_PROGRESS_ON);
} }
@Override @Override
public void loadMessageForViewFinished(Account account, String folder, String uid, Message message) { public void loadMessageForViewFinished(Account account, String folder, String uid, Message message) {
if (mSourceMessageUid==null
|| !mSourceMessageUid.equals(uid)) {
return;
}
mHandler.sendEmptyMessage(MSG_PROGRESS_OFF); mHandler.sendEmptyMessage(MSG_PROGRESS_OFF);
} }
@Override @Override
public void loadMessageForViewBodyAvailable(Account account, String folder, String uid, final Message message) { public void loadMessageForViewBodyAvailable(Account account, String folder, String uid, final Message message) {
if (mSourceMessageUid==null
|| !mSourceMessageUid.equals(uid)) {
return;
}
mSourceMessage = message; mSourceMessage = message;
runOnUiThread(new Runnable() { runOnUiThread(new Runnable() {
public void run() { public void run() {
@ -1314,6 +1329,10 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
@Override @Override
public void loadMessageForViewFailed(Account account, String folder, String uid, final String message) { public void loadMessageForViewFailed(Account account, String folder, String uid, final String message) {
if (mSourceMessageUid==null
|| !mSourceMessageUid.equals(uid)) {
return;
}
mHandler.sendEmptyMessage(MSG_PROGRESS_OFF); mHandler.sendEmptyMessage(MSG_PROGRESS_OFF);
// TODO show network error // TODO show network error
} }