Update SMS/MMS as sending when retrying failed send.

This was only impacting SMS/MMS as Push already reset the status.
master
Cody Henthorne 2020-06-05 13:46:25 -04:00 committed by GitHub
parent 4a455ff958
commit fb600e9829
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -113,6 +113,11 @@ public final class MmsSendJob extends SendJob {
return KEY;
}
@Override
public void onAdded() {
DatabaseFactory.getMmsDatabase(context).markAsSending(messageId);
}
@Override
public void onSend() throws MmsException, NoSuchMessageException, IOException {
MmsDatabase database = DatabaseFactory.getMmsDatabase(context);

View File

@ -65,6 +65,11 @@ public class SmsSendJob extends SendJob {
return KEY;
}
@Override
public void onAdded() {
DatabaseFactory.getSmsDatabase(context).markAsSending(messageId);
}
@Override
public void onSend() throws NoSuchMessageException, TooManyRetriesException {
if (runAttempt >= MAX_ATTEMPTS) {