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

View file

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