Merge pull request #2881 from nextcloud/bugfix/noid/avoidNpeSetupSwipeToReply

Avoid NPE in setupSwipeToReply
This commit is contained in:
Marcel Hibbe 2023-03-23 13:14:43 +01:00 committed by GitHub
commit 60f0c1e079
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -415,8 +415,9 @@ class ChatController(args: Bundle) :
participantPermissions.hasChatPermission() &&
!isReadOnlyConversation()
) {
activity?.let {
val messageSwipeController = MessageSwipeCallback(
activity!!,
it,
object : MessageSwipeActions {
override fun showReplyUI(position: Int) {
val chatMessage = adapter?.items?.get(position)?.item as ChatMessage?
@ -429,6 +430,7 @@ class ChatController(args: Bundle) :
itemTouchHelper.attachToRecyclerView(binding?.messagesListView)
}
}
}
private fun handleFromNotification() {
var apiVersion = 1