mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-23 05:25:31 +03:00
Merge pull request #2800 from nextcloud/bugfix/noid/avoidNpeForUnreadBubble
Bugfix/noid/avoid npe for unread bubble
This commit is contained in:
commit
f1fd334b64
1 changed files with 9 additions and 6 deletions
|
@ -2533,14 +2533,17 @@ class ChatController(args: Bundle) :
|
|||
|
||||
private fun modifyMessageCount(shouldAddNewMessagesNotice: Boolean, shouldScroll: Boolean) {
|
||||
if (!shouldAddNewMessagesNotice && !shouldScroll) {
|
||||
if (!binding?.popupBubbleView?.isShown!!) {
|
||||
newMessagesCount = 1
|
||||
binding?.scrollDownButton?.visibility = View.GONE
|
||||
binding?.popupBubbleView?.show()
|
||||
} else if (binding?.popupBubbleView?.isShown!!) {
|
||||
newMessagesCount++
|
||||
binding?.popupBubbleView?.isShown?.let {
|
||||
if (it) {
|
||||
newMessagesCount++
|
||||
} else {
|
||||
newMessagesCount = 1
|
||||
binding?.scrollDownButton?.visibility = View.GONE
|
||||
binding?.popupBubbleView?.show()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
binding?.scrollDownButton?.visibility = View.GONE
|
||||
newMessagesCount = 0
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue