mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-28 01:24:03 +03:00
Merge pull request #2881 from nextcloud/bugfix/noid/avoidNpeSetupSwipeToReply
Avoid NPE in setupSwipeToReply
This commit is contained in:
commit
60f0c1e079
1 changed files with 12 additions and 10 deletions
|
@ -415,8 +415,9 @@ class ChatController(args: Bundle) :
|
||||||
participantPermissions.hasChatPermission() &&
|
participantPermissions.hasChatPermission() &&
|
||||||
!isReadOnlyConversation()
|
!isReadOnlyConversation()
|
||||||
) {
|
) {
|
||||||
|
activity?.let {
|
||||||
val messageSwipeController = MessageSwipeCallback(
|
val messageSwipeController = MessageSwipeCallback(
|
||||||
activity!!,
|
it,
|
||||||
object : MessageSwipeActions {
|
object : MessageSwipeActions {
|
||||||
override fun showReplyUI(position: Int) {
|
override fun showReplyUI(position: Int) {
|
||||||
val chatMessage = adapter?.items?.get(position)?.item as ChatMessage?
|
val chatMessage = adapter?.items?.get(position)?.item as ChatMessage?
|
||||||
|
@ -429,6 +430,7 @@ class ChatController(args: Bundle) :
|
||||||
itemTouchHelper.attachToRecyclerView(binding?.messagesListView)
|
itemTouchHelper.attachToRecyclerView(binding?.messagesListView)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun handleFromNotification() {
|
private fun handleFromNotification() {
|
||||||
var apiVersion = 1
|
var apiVersion = 1
|
||||||
|
|
Loading…
Reference in a new issue