From b887196c310046b34c08f0d57e370e0f96e77016 Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Sat, 14 Jul 2018 21:36:47 +0200 Subject: [PATCH] fix crash when opening profiles with default emojis selected --- .../main/java/com/keylesspalace/tusky/AccountActivity.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/AccountActivity.kt b/app/src/main/java/com/keylesspalace/tusky/AccountActivity.kt index 83ecc37b..9bb731ec 100644 --- a/app/src/main/java/com/keylesspalace/tusky/AccountActivity.kt +++ b/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)