fix crash when opening profiles with default emojis selected

This commit is contained in:
Konrad Pozniak 2018-07-14 21:36:47 +02:00
parent aa5eb9f99a
commit b887196c31
1 changed files with 5 additions and 1 deletions

View File

@ -296,7 +296,11 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
accountUsernameTextView.text = usernameFormatted accountUsernameTextView.text = usernameFormatted
accountDisplayNameTextView.text = CustomEmojiHelper.emojifyString(account.name, account.emojis, accountDisplayNameTextView) accountDisplayNameTextView.text = CustomEmojiHelper.emojifyString(account.name, account.emojis, accountDisplayNameTextView)
if (supportActionBar != null) { if (supportActionBar != null) {
supportActionBar?.title = EmojiCompat.get().process(account.name) try {
supportActionBar?.title = EmojiCompat.get().process(account.name)
} catch (e: IllegalStateException) {
supportActionBar?.title = account.name
}
val subtitle = String.format(getString(R.string.status_username_format), val subtitle = String.format(getString(R.string.status_username_format),
account.username) account.username)