mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-30 13:35:18 +00:00
Update message details activity display when resending SMS/MMS
// FREEBIE
This commit is contained in:
parent
dee2e0906e
commit
cc65fab226
@ -109,12 +109,14 @@ public class MessageRecipientListItem extends RelativeLayout
|
|||||||
});
|
});
|
||||||
} else if (networkFailure != null || (!isPushGroup && record.isFailed())) {
|
} else if (networkFailure != null || (!isPushGroup && record.isFailed())) {
|
||||||
resendButton.setVisibility(View.VISIBLE);
|
resendButton.setVisibility(View.VISIBLE);
|
||||||
|
resendButton.setEnabled(true);
|
||||||
conflictButton.setVisibility(View.GONE);
|
conflictButton.setVisibility(View.GONE);
|
||||||
|
|
||||||
errorText = getContext().getString(R.string.MessageDetailsRecipient_failed_to_send);
|
errorText = getContext().getString(R.string.MessageDetailsRecipient_failed_to_send);
|
||||||
resendButton.setOnClickListener(new OnClickListener() {
|
resendButton.setOnClickListener(new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
resendButton.setEnabled(false);
|
||||||
new ResendAsyncTask(masterSecret, record, networkFailure).execute();
|
new ResendAsyncTask(masterSecret, record, networkFailure).execute();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -54,7 +54,8 @@ public class MmsSendJob extends SendJob {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAdded() {
|
public void onAdded() {
|
||||||
|
MmsDatabase database = DatabaseFactory.getMmsDatabase(context);
|
||||||
|
database.markAsSending(messageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -11,6 +11,7 @@ import org.thoughtcrime.securesms.crypto.MasterSecret;
|
|||||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||||
import org.thoughtcrime.securesms.database.EncryptingSmsDatabase;
|
import org.thoughtcrime.securesms.database.EncryptingSmsDatabase;
|
||||||
import org.thoughtcrime.securesms.database.NoSuchMessageException;
|
import org.thoughtcrime.securesms.database.NoSuchMessageException;
|
||||||
|
import org.thoughtcrime.securesms.database.SmsDatabase;
|
||||||
import org.thoughtcrime.securesms.database.model.SmsMessageRecord;
|
import org.thoughtcrime.securesms.database.model.SmsMessageRecord;
|
||||||
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement;
|
import org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement;
|
||||||
import org.thoughtcrime.securesms.jobs.requirements.NetworkOrServiceRequirement;
|
import org.thoughtcrime.securesms.jobs.requirements.NetworkOrServiceRequirement;
|
||||||
@ -39,7 +40,8 @@ public class SmsSendJob extends SendJob {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAdded() {
|
public void onAdded() {
|
||||||
|
SmsDatabase database = DatabaseFactory.getEncryptingSmsDatabase(context);
|
||||||
|
database.markAsSending(messageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user