Fix #4991: lifecycle should be at least started

This commit is contained in:
Tiago Loureiro 2022-01-19 11:56:14 -03:00
parent e73992f5df
commit 4dea7131b1
1 changed files with 1 additions and 1 deletions

View File

@ -675,7 +675,7 @@ class RoomDetailFragment @Inject constructor(
*/ */
private fun EmojiPopup.Builder.setOnEmojiPopupDismissListenerLifecycleAware(action: () -> Unit): EmojiPopup.Builder { private fun EmojiPopup.Builder.setOnEmojiPopupDismissListenerLifecycleAware(action: () -> Unit): EmojiPopup.Builder {
return setOnEmojiPopupDismissListener { return setOnEmojiPopupDismissListener {
if (lifecycle.currentState == Lifecycle.State.STARTED) { if (lifecycle.currentState.isAtLeast(Lifecycle.State.STARTED)) {
action() action()
} }
} }