mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-14 14:02:49 +00:00
Drop AddProfileActivity in favor of EditProfileActivity
Also automatically update the TextDrawable on name changes in EditProfileActivity
This commit is contained in:
parent
22c5237129
commit
ca210de78e
9 changed files with 63 additions and 298 deletions
|
@ -8,6 +8,7 @@ import java.lang.reflect.UndeclaredThrowableException;
|
|||
|
||||
import me.impy.aegis.crypto.otp.OTP;
|
||||
import me.impy.aegis.db.DatabaseEntry;
|
||||
import me.impy.aegis.helpers.TextDrawableHelper;
|
||||
|
||||
public class KeyProfile implements Serializable {
|
||||
private String _code;
|
||||
|
@ -38,14 +39,6 @@ public class KeyProfile implements Serializable {
|
|||
}
|
||||
|
||||
public TextDrawable getDrawable() {
|
||||
String name = _entry.getName();
|
||||
if (name == null || name.length() <= 1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ColorGenerator generator = ColorGenerator.MATERIAL;
|
||||
int color = generator.getColor(name);
|
||||
|
||||
return TextDrawable.builder().buildRound(name.substring(0, 1).toUpperCase(), color);
|
||||
return TextDrawableHelper.generate(getEntry().getName());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue