mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-24 10:22:15 -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:
parent
4e2ba837aa
commit
b8f4fdb882
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user