CustomEmojiHelper: rewrite to Kotlin (#1787)
* CustomEmojiHelper: rewrite to Kotlin * CustomEmojiHelper: PR fixes
This commit is contained in:
parent
e72bdcaf42
commit
2fc7ad13bb
18 changed files with 151 additions and 190 deletions
|
|
@ -23,8 +23,7 @@ import android.widget.ArrayAdapter
|
|||
import androidx.preference.PreferenceManager
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.db.AccountEntity
|
||||
import com.keylesspalace.tusky.util.CustomEmojiHelper
|
||||
import com.keylesspalace.tusky.util.loadAvatar
|
||||
import com.keylesspalace.tusky.util.*
|
||||
import kotlinx.android.synthetic.main.item_autocomplete_account.view.*
|
||||
|
||||
class AccountSelectionAdapter(context: Context) : ArrayAdapter<AccountEntity>(context, R.layout.item_autocomplete_account) {
|
||||
|
|
@ -43,7 +42,7 @@ class AccountSelectionAdapter(context: Context) : ArrayAdapter<AccountEntity>(co
|
|||
val displayName = view.display_name
|
||||
val avatar = view.avatar
|
||||
username.text = account.fullName
|
||||
displayName.text = CustomEmojiHelper.emojifyString(account.displayName, account.emojis, displayName)
|
||||
displayName.text = account.displayName.emojify(account.emojis, displayName)
|
||||
|
||||
val avatarRadius = avatar.context.resources.getDimensionPixelSize(R.dimen.avatar_radius_42dp)
|
||||
val animateAvatar = PreferenceManager.getDefaultSharedPreferences(avatar.context)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue