Use a more meaningful name for old status (#3552)

This commit is contained in:
Marcin Mielniczuk 2019-10-01 21:42:05 +02:00 committed by Daniel Gultsch
parent 7c631c493a
commit c7bbfaf061
1 changed files with 3 additions and 3 deletions

View File

@ -3776,11 +3776,11 @@ public class XmppConnectionService extends Service {
public void markMessage(Message message, int status, String errorMessage) { public void markMessage(Message message, int status, String errorMessage) {
final int c = message.getStatus(); final int oldStatus = message.getStatus();
if (status == Message.STATUS_SEND_FAILED && (c == Message.STATUS_SEND_RECEIVED || c == Message.STATUS_SEND_DISPLAYED)) { if (status == Message.STATUS_SEND_FAILED && (oldStatus == Message.STATUS_SEND_RECEIVED || oldStatus == Message.STATUS_SEND_DISPLAYED)) {
return; return;
} }
if (status == Message.STATUS_SEND_RECEIVED && c == Message.STATUS_SEND_DISPLAYED) { if (status == Message.STATUS_SEND_RECEIVED && oldStatus == Message.STATUS_SEND_DISPLAYED) {
return; return;
} }
message.setErrorMessage(errorMessage); message.setErrorMessage(errorMessage);