Skip to content
Snippets Groups Projects
Commit ad482854 authored by Adrien Béraud's avatar Adrien Béraud Committed by Maxime Callet
Browse files

account list: cleanup

Change-Id: Icd6dae0d0b13be85d97ce426241076b75c491a4a
parent 6a74baf6
No related branches found
No related tags found
No related merge requests found
......@@ -121,9 +121,7 @@ class AccountSpinnerAdapter(context: Context, accounts: List<Account>, val dispo
if (position == super.getCount()) {
return TYPE_CREATE_JAMI
}
return if (position == super.getCount() + 1) {
TYPE_CREATE_SIP
} else TYPE_ACCOUNT
return if (position == super.getCount() + 1) TYPE_CREATE_SIP else TYPE_ACCOUNT
}
override fun getCount(): Int {
......
......@@ -95,11 +95,11 @@ class AvatarDrawable : Drawable {
}
fun build(context: Context, account: Account, profile: Profile, crop: Boolean = true): AvatarDrawable {
return Builder()
.withPhoto(profile.avatar as Bitmap?)
.withNameData(profile.displayName, account.registeredName)
.withId(account.uri)
.withCircleCrop(crop)
.build(context)
.withPhoto(profile.avatar as Bitmap?)
.withNameData(profile.displayName, account.registeredName)
.withId(account.uri)
.withCircleCrop(crop)
.build(context)
}
private fun getSubBounds(bounds: Rect, total: Int, i: Int): Rect? {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment