@lodev09/react-native-true-sheet 3.4.1 → 3.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -42,6 +42,12 @@ class RNScreensFragmentObserver(
|
|
|
42
42
|
override fun onFragmentStopped(fm: FragmentManager, fragment: Fragment) {
|
|
43
43
|
super.onFragmentStopped(fm, fragment)
|
|
44
44
|
|
|
45
|
+
// Ignore if app is in background (fragments stop with activity)
|
|
46
|
+
val activity = reactContext.currentActivity as? AppCompatActivity ?: return
|
|
47
|
+
if (!activity.lifecycle.currentState.isAtLeast(androidx.lifecycle.Lifecycle.State.RESUMED)) {
|
|
48
|
+
return
|
|
49
|
+
}
|
|
50
|
+
|
|
45
51
|
if (activeModalFragments.contains(fragment)) {
|
|
46
52
|
activeModalFragments.remove(fragment)
|
|
47
53
|
|
package/package.json
CHANGED