mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-22 02:58:26 +00:00
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
This commit is contained in:
parent
a421630789
commit
deb96646a3
@ -56,6 +56,13 @@
|
|||||||
tools:visibility="visible"
|
tools:visibility="visible"
|
||||||
tools:text="New identity" />
|
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>
|
</LinearLayout>
|
||||||
|
|
||||||
<Button android:id="@+id/conflict_button"
|
<Button android:id="@+id/conflict_button"
|
||||||
|
@ -885,6 +885,7 @@
|
|||||||
<!-- message_recipients_list_item -->
|
<!-- message_recipients_list_item -->
|
||||||
<string name="message_recipients_list_item__verify">VERIFY</string>
|
<string name="message_recipients_list_item__verify">VERIFY</string>
|
||||||
<string name="message_recipients_list_item__resend">RESEND</string>
|
<string name="message_recipients_list_item__resend">RESEND</string>
|
||||||
|
<string name="message_recipients_list_item__resending">Resending...</string>
|
||||||
|
|
||||||
<!-- GroupUtil -->
|
<!-- GroupUtil -->
|
||||||
<plurals name="GroupUtil_joined_the_group">
|
<plurals name="GroupUtil_joined_the_group">
|
||||||
|
@ -50,6 +50,7 @@ public class MessageRecipientListItem extends RelativeLayout
|
|||||||
private Recipient recipient;
|
private Recipient recipient;
|
||||||
private FromTextView fromView;
|
private FromTextView fromView;
|
||||||
private TextView errorDescription;
|
private TextView errorDescription;
|
||||||
|
private TextView actionDescription;
|
||||||
private Button conflictButton;
|
private Button conflictButton;
|
||||||
private Button resendButton;
|
private Button resendButton;
|
||||||
private AvatarImageView contactPhotoImage;
|
private AvatarImageView contactPhotoImage;
|
||||||
@ -68,6 +69,7 @@ public class MessageRecipientListItem extends RelativeLayout
|
|||||||
protected void onFinishInflate() {
|
protected void onFinishInflate() {
|
||||||
this.fromView = (FromTextView) findViewById(R.id.from);
|
this.fromView = (FromTextView) findViewById(R.id.from);
|
||||||
this.errorDescription = (TextView) findViewById(R.id.error_description);
|
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.contactPhotoImage = (AvatarImageView) findViewById(R.id.contact_photo_image);
|
||||||
this.conflictButton = (Button) findViewById(R.id.conflict_button);
|
this.conflictButton = (Button) findViewById(R.id.conflict_button);
|
||||||
this.resendButton = (Button) findViewById(R.id.resend_button);
|
this.resendButton = (Button) findViewById(R.id.resend_button);
|
||||||
@ -116,7 +118,10 @@ public class MessageRecipientListItem extends RelativeLayout
|
|||||||
resendButton.setOnClickListener(new OnClickListener() {
|
resendButton.setOnClickListener(new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
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();
|
new ResendAsyncTask(masterSecret, record, networkFailure).execute();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user