mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-11 01:50:07 +00:00
add logging for unread messages popup bug
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
b529d1328a
commit
29362fab4b
@ -1042,8 +1042,10 @@ class ChatActivity :
|
||||
is ChatViewModel.OutOfOfficeUIState.Error -> {
|
||||
Log.e(TAG, "Error fetching/ no user absence data", uiState.exception)
|
||||
}
|
||||
|
||||
ChatViewModel.OutOfOfficeUIState.None -> {
|
||||
}
|
||||
|
||||
is ChatViewModel.OutOfOfficeUIState.Success -> {
|
||||
binding.outOfOfficeContainer.visibility = View.VISIBLE
|
||||
|
||||
@ -2922,7 +2924,23 @@ class ChatActivity :
|
||||
}
|
||||
}
|
||||
|
||||
private fun isScrolledToBottom() = layoutManager?.findFirstVisibleItemPosition() == 0
|
||||
private fun isScrolledToBottom(): Boolean {
|
||||
val position = layoutManager?.findFirstVisibleItemPosition()
|
||||
Log.d(TAG, "first visible item position is :" + position)
|
||||
|
||||
if (position == -1) {
|
||||
Log.d(TAG, "position is -1")
|
||||
} else if (position != null) {
|
||||
val item = adapter?.items?.get(position)?.item
|
||||
if (item is ChatMessage) {
|
||||
Log.d(TAG, "first visible item message is :" + item.message)
|
||||
} else if (item is Date) {
|
||||
Log.d(TAG, "first visible item time is :" + item.time)
|
||||
}
|
||||
}
|
||||
|
||||
return layoutManager?.findFirstVisibleItemPosition() == 0
|
||||
}
|
||||
|
||||
private fun setUnreadMessageMarker(chatMessageList: List<ChatMessage>) {
|
||||
if (chatMessageList.isNotEmpty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user