Added Identicon

This commit is contained in:
Mikunj
2019-09-06 11:49:02 +10:00
parent 387f99cd94
commit 9e3a6ce977
6 changed files with 223 additions and 3 deletions

View File

@@ -21,6 +21,7 @@ import android.widget.Toast;
import com.lelloman.identicon.drawable.ClassicIdenticonDrawable;
import org.thoughtcrime.securesms.database.Address;
import org.thoughtcrime.securesms.loki.identicon.JazzIdenticonDrawable;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
import network.loki.messenger.R;
@@ -101,7 +102,7 @@ public class ProfilePreference extends Preference {
int height = avatarView.getHeight();
if (width == 0 || height == 0) return true;
avatarView.getViewTreeObserver().removeOnPreDrawListener(this);
ClassicIdenticonDrawable identicon = new ClassicIdenticonDrawable(width, height, userHexEncodedPublicKey.hashCode());
JazzIdenticonDrawable identicon = new JazzIdenticonDrawable(width, height, userHexEncodedPublicKey);
avatarView.setImageDrawable(identicon);
return true;
}