mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-21 04:29:45 +01:00
Merge pull request #2800 from nextcloud/bugfix/noid/avoidNpeForUnreadBubble
Bugfix/noid/avoid npe for unread bubble
This commit is contained in:
commit
f1fd334b64
@ -2533,14 +2533,17 @@ class ChatController(args: Bundle) :
|
|||||||
|
|
||||||
private fun modifyMessageCount(shouldAddNewMessagesNotice: Boolean, shouldScroll: Boolean) {
|
private fun modifyMessageCount(shouldAddNewMessagesNotice: Boolean, shouldScroll: Boolean) {
|
||||||
if (!shouldAddNewMessagesNotice && !shouldScroll) {
|
if (!shouldAddNewMessagesNotice && !shouldScroll) {
|
||||||
if (!binding?.popupBubbleView?.isShown!!) {
|
binding?.popupBubbleView?.isShown?.let {
|
||||||
newMessagesCount = 1
|
if (it) {
|
||||||
binding?.scrollDownButton?.visibility = View.GONE
|
newMessagesCount++
|
||||||
binding?.popupBubbleView?.show()
|
} else {
|
||||||
} else if (binding?.popupBubbleView?.isShown!!) {
|
newMessagesCount = 1
|
||||||
newMessagesCount++
|
binding?.scrollDownButton?.visibility = View.GONE
|
||||||
|
binding?.popupBubbleView?.show()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
binding?.scrollDownButton?.visibility = View.GONE
|
||||||
newMessagesCount = 0
|
newMessagesCount = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user