Implement user selection view

This commit is contained in:
Niels Andriesse
2019-10-10 13:53:02 +11:00
parent 25bd1073b0
commit 9207e479a6
9 changed files with 186 additions and 7 deletions

View File

@@ -19,6 +19,7 @@ import android.view.ViewOutlineProvider;
import org.thoughtcrime.securesms.color.MaterialColor;
import org.thoughtcrime.securesms.contacts.avatars.ContactColors;
import org.thoughtcrime.securesms.contacts.avatars.GeneratedContactPhoto;
import org.thoughtcrime.securesms.database.Address;
import org.thoughtcrime.securesms.loki.JazzIdenticonDrawable;
import org.thoughtcrime.securesms.mms.GlideRequests;
import org.thoughtcrime.securesms.recipients.Recipient;
@@ -123,6 +124,10 @@ public class AvatarImageView extends AppCompatImageView {
setImageDrawable(image);
}
public void update(String hexEncodedPublicKey) {
this.recipient = Recipient.from(getContext(), Address.fromSerialized(hexEncodedPublicKey), false);
}
public void setAvatar(@NonNull GlideRequests requestManager, @Nullable Recipient recipient, boolean quickContactEnabled) {
this.recipient = recipient;
/*