From 4ad46ed4a6968ad4af1a89c9e63148b7a4c0b050 Mon Sep 17 00:00:00 2001 From: Tiago Loureiro Date: Wed, 19 Jan 2022 11:56:14 -0300 Subject: [PATCH 1/3] Fix: lifecycle should be at least started --- .../vector/app/features/home/room/detail/RoomDetailFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt index deaa56776e..2dfd793e21 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt @@ -675,7 +675,7 @@ class RoomDetailFragment @Inject constructor( */ private fun EmojiPopup.Builder.setOnEmojiPopupDismissListenerLifecycleAware(action: () -> Unit): EmojiPopup.Builder { return setOnEmojiPopupDismissListener { - if (lifecycle.currentState == Lifecycle.State.STARTED) { + if (lifecycle.currentState.isAtLeast(Lifecycle.State.STARTED)) { action() } } From 4dea7131b1fc86f95bacd7981b1fb0b682aa5b74 Mon Sep 17 00:00:00 2001 From: Tiago Loureiro Date: Wed, 19 Jan 2022 11:56:14 -0300 Subject: [PATCH 2/3] Fix #4991: lifecycle should be at least started --- .../vector/app/features/home/room/detail/RoomDetailFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt index deaa56776e..2dfd793e21 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt @@ -675,7 +675,7 @@ class RoomDetailFragment @Inject constructor( */ private fun EmojiPopup.Builder.setOnEmojiPopupDismissListenerLifecycleAware(action: () -> Unit): EmojiPopup.Builder { return setOnEmojiPopupDismissListener { - if (lifecycle.currentState == Lifecycle.State.STARTED) { + if (lifecycle.currentState.isAtLeast(Lifecycle.State.STARTED)) { action() } } From 3c4fbce440aea53cc3c9458dda734df53046459b Mon Sep 17 00:00:00 2001 From: Tiago Loureiro Date: Wed, 19 Jan 2022 12:02:47 -0300 Subject: [PATCH 3/3] Add changelog --- changelog.d/4991.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/4991.bugfix diff --git a/changelog.d/4991.bugfix b/changelog.d/4991.bugfix new file mode 100644 index 0000000000..cd534374c9 --- /dev/null +++ b/changelog.d/4991.bugfix @@ -0,0 +1 @@ +EmojiPopupDismissListener not being triggered after dismissing the EmojiPopup \ No newline at end of file