Merge pull request #1372 from nextcloud/bugfix/1371/hardenTitleCalculation

Harden Chat Title Calculation
This commit is contained in:
Andy Scherzinger 2021-06-30 00:03:01 +02:00 committed by GitHub
commit 40d76c6436
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1270,7 +1270,11 @@ class ChatController(args: Bundle) :
override val title: String
get() =
if (currentConversation?.displayName != null) {
" " + EmojiCompat.get().process(currentConversation?.displayName as CharSequence).toString()
try {
" " + EmojiCompat.get().process(currentConversation?.displayName as CharSequence).toString()
} catch (e: IllegalStateException) {
" " + currentConversation?.displayName
}
} else {
""
}