CustomEmojiHelper: rewrite to Kotlin (#1787)

* CustomEmojiHelper: rewrite to Kotlin

* CustomEmojiHelper: PR fixes
This commit is contained in:
Alibek Omarov 2020-05-15 23:09:12 +03:00 committed by GitHub
commit 2fc7ad13bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 151 additions and 190 deletions

View file

@ -302,7 +302,7 @@ class StatusViewHelper(private val itemView: View) {
val percent = calculatePercent(options[i].votesCount, poll.votersCount, poll.votesCount)
val pollOptionText = buildDescription(options[i].title, percent, pollResults[i].context)
pollResults[i].text = CustomEmojiHelper.emojifyText(pollOptionText, emojis, pollResults[i])
pollResults[i].text = pollOptionText.emojify(emojis, pollResults[i])
pollResults[i].visibility = View.VISIBLE
val level = percent * 100