Merge pull request #4994 from tgloureiro/fix_4991

Fix EmojiPopupDismissListener not being triggered after dismissing the EmojiPopup
This commit is contained in:
Benoit Marty 2022-01-19 16:12:31 +01:00 committed by GitHub
commit 73fba6a7b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
changelog.d/4991.bugfix Normal file
View File

@ -0,0 +1 @@
EmojiPopupDismissListener not being triggered after dismissing the EmojiPopup

View File

@ -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()
}
}