Add action indicator when resending a message.

When message is being resent, "RESEND" button now disappears.
"Resending..." text is displayed instead of an error message.

Fixes #6307
Closes #6347
pull/1/head
greenjoe 7 years ago committed by Moxie Marlinspike
parent a421630789
commit deb96646a3

@ -56,6 +56,13 @@
tools:visibility="visible"
tools:text="New identity" />
<TextView android:id="@+id/action_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
tools:visibility="visible"
tools:text="action" />
</LinearLayout>
<Button android:id="@+id/conflict_button"

@ -885,6 +885,7 @@
<!-- message_recipients_list_item -->
<string name="message_recipients_list_item__verify">VERIFY</string>
<string name="message_recipients_list_item__resend">RESEND</string>
<string name="message_recipients_list_item__resending">Resending...</string>
<!-- GroupUtil -->
<plurals name="GroupUtil_joined_the_group">

@ -50,6 +50,7 @@ public class MessageRecipientListItem extends RelativeLayout
private Recipient recipient;
private FromTextView fromView;
private TextView errorDescription;
private TextView actionDescription;
private Button conflictButton;
private Button resendButton;
private AvatarImageView contactPhotoImage;
@ -68,6 +69,7 @@ public class MessageRecipientListItem extends RelativeLayout
protected void onFinishInflate() {
this.fromView = (FromTextView) findViewById(R.id.from);
this.errorDescription = (TextView) findViewById(R.id.error_description);
this.actionDescription = (TextView) findViewById(R.id.action_description);
this.contactPhotoImage = (AvatarImageView) findViewById(R.id.contact_photo_image);
this.conflictButton = (Button) findViewById(R.id.conflict_button);
this.resendButton = (Button) findViewById(R.id.resend_button);
@ -116,7 +118,10 @@ public class MessageRecipientListItem extends RelativeLayout
resendButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
resendButton.setEnabled(false);
resendButton.setVisibility(View.GONE);
errorDescription.setVisibility(View.GONE);
actionDescription.setVisibility(View.VISIBLE);
actionDescription.setText(R.string.message_recipients_list_item__resending);
new ResendAsyncTask(masterSecret, record, networkFailure).execute();
}
});

Loading…
Cancel
Save