fix crash when opening profiles with default emojis selected

main
Konrad Pozniak 7 years ago
parent 9791899f1b
commit 3cb94d6e02
  1. 6
      app/src/main/java/com/keylesspalace/tusky/AccountActivity.kt

@ -296,7 +296,11 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
accountUsernameTextView.text = usernameFormatted
accountDisplayNameTextView.text = CustomEmojiHelper.emojifyString(account.name, account.emojis, accountDisplayNameTextView)
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),
account.username)

Loading…
Cancel
Save