Display badge on Payment Details.

This commit is contained in:
Cody Henthorne
2021-11-24 12:47:02 -05:00
committed by Greyson Parrelli
parent c5d7188dcb
commit 5b2ca6a1d3
2 changed files with 14 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ import androidx.navigation.Navigation;
import org.signal.core.util.logging.Log;
import org.thoughtcrime.securesms.LoggingFragment;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.badges.BadgeImageView;
import org.thoughtcrime.securesms.components.AvatarImageView;
import org.thoughtcrime.securesms.database.PaymentDatabase;
import org.thoughtcrime.securesms.payments.Direction;
@@ -57,6 +58,7 @@ public final class PaymentDetailsFragment extends LoggingFragment {
PaymentDetailsParcelable details = PaymentDetailsFragmentArgs.fromBundle(requireArguments()).getPaymentDetails();
AvatarImageView avatar = view.findViewById(R.id.payments_details_avatar);
BadgeImageView badge = view.findViewById(R.id.payments_details_badge);
TextView contactFromTo = view.findViewById(R.id.payments_details_contact_to_from);
MoneyView amount = view.findViewById(R.id.payments_details_amount);
TextView note = view.findViewById(R.id.payments_details_note);
@@ -106,6 +108,7 @@ public final class PaymentDetailsFragment extends LoggingFragment {
avatar.setImageResource(R.drawable.ic_mobilecoin_avatar_24);
} else {
avatar.setRecipient(state.getRecipient(), true);
badge.setBadgeFromRecipient(state.getRecipient());
}
contactFromTo.setText(describeToOrFrom(state));