From 4154f036db28627ae7810a62ad00802674f0a154 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Wed, 16 Mar 2022 16:11:06 +0000 Subject: [PATCH] fixing crash when tapping verification item - caused by the setArguments being called on the TimelineFragment not the bottomsheet we've just created --- changelog.d/5540.bugfix | 1 + .../features/home/room/detail/TimelineFragment.kt | 12 +++++------- 2 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 changelog.d/5540.bugfix diff --git a/changelog.d/5540.bugfix b/changelog.d/5540.bugfix new file mode 100644 index 0000000000..8887cf4074 --- /dev/null +++ b/changelog.d/5540.bugfix @@ -0,0 +1 @@ +Fixes crash when tapping the timeline verification surround box instead of the buttons \ No newline at end of file diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt index ab64f40159..4c53c32d57 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt @@ -1771,13 +1771,11 @@ class TimelineFragment @Inject constructor( } is RoomDetailAction.ResumeVerification -> { val otherUserId = data.otherUserId ?: return - VerificationBottomSheet().apply { - setArguments(VerificationBottomSheet.VerificationArgs( - otherUserId = otherUserId, - verificationId = data.transactionId, - roomId = timelineArgs.roomId - )) - }.show(parentFragmentManager, "REQ") + VerificationBottomSheet.withArgs( + roomId = timelineArgs.roomId, + otherUserId = otherUserId, + transactionId = data.transactionId, + ).show(parentFragmentManager, "REQ") } } }