diff --git a/src/org/thoughtcrime/securesms/MessageRecipientListItem.java b/src/org/thoughtcrime/securesms/MessageRecipientListItem.java index 11dbdad6b2..06547fe982 100644 --- a/src/org/thoughtcrime/securesms/MessageRecipientListItem.java +++ b/src/org/thoughtcrime/securesms/MessageRecipientListItem.java @@ -109,12 +109,14 @@ public class MessageRecipientListItem extends RelativeLayout }); } else if (networkFailure != null || (!isPushGroup && record.isFailed())) { resendButton.setVisibility(View.VISIBLE); + resendButton.setEnabled(true); conflictButton.setVisibility(View.GONE); errorText = getContext().getString(R.string.MessageDetailsRecipient_failed_to_send); resendButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { + resendButton.setEnabled(false); new ResendAsyncTask(masterSecret, record, networkFailure).execute(); } }); diff --git a/src/org/thoughtcrime/securesms/jobs/MmsSendJob.java b/src/org/thoughtcrime/securesms/jobs/MmsSendJob.java index 3cd6915b07..bd7485b55f 100644 --- a/src/org/thoughtcrime/securesms/jobs/MmsSendJob.java +++ b/src/org/thoughtcrime/securesms/jobs/MmsSendJob.java @@ -54,7 +54,8 @@ public class MmsSendJob extends SendJob { @Override public void onAdded() { - + MmsDatabase database = DatabaseFactory.getMmsDatabase(context); + database.markAsSending(messageId); } @Override diff --git a/src/org/thoughtcrime/securesms/jobs/SmsSendJob.java b/src/org/thoughtcrime/securesms/jobs/SmsSendJob.java index c22e084d90..06e21eeb7f 100644 --- a/src/org/thoughtcrime/securesms/jobs/SmsSendJob.java +++ b/src/org/thoughtcrime/securesms/jobs/SmsSendJob.java @@ -11,6 +11,7 @@ import org.thoughtcrime.securesms.crypto.MasterSecret; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.EncryptingSmsDatabase; import org.thoughtcrime.securesms.database.NoSuchMessageException; +import org.thoughtcrime.securesms.database.SmsDatabase; import org.thoughtcrime.securesms.database.model.SmsMessageRecord; import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement; import org.thoughtcrime.securesms.jobs.requirements.NetworkOrServiceRequirement; @@ -39,7 +40,8 @@ public class SmsSendJob extends SendJob { @Override public void onAdded() { - + SmsDatabase database = DatabaseFactory.getEncryptingSmsDatabase(context); + database.markAsSending(messageId); } @Override