@@ -17,12 +17,9 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
1717import com.facebook.react.bridge.GuardedRunnable
1818import com.facebook.react.bridge.ReactContext
1919import com.facebook.react.uimanager.PixelUtil
20- import com.facebook.react.uimanager.ReactClippingViewGroup
2120import com.facebook.react.uimanager.UIManagerHelper
2221import com.facebook.react.uimanager.UIManagerModule
2322import com.facebook.react.uimanager.events.EventDispatcher
24- import com.facebook.react.views.scroll.ReactHorizontalScrollView
25- import com.facebook.react.views.scroll.ReactScrollView
2623import com.google.android.material.bottomsheet.BottomSheetBehavior
2724import com.google.android.material.shape.CornerFamily
2825import com.google.android.material.shape.MaterialShapeDrawable
@@ -404,29 +401,6 @@ class Screen(
404401 }
405402
406403 if (child is ViewGroup ) {
407- // The children are miscounted when there's removeClippedSubviews prop
408- // set to true (which is the default for FlatLists).
409- // Unless the child is a ScrollView it's safe to assume that it's true
410- // and add a simple view for each possibly clipped item to make it work as expected.
411- // See https://github.com/software-mansion/react-native-screens/pull/2495
412-
413- if (child is ReactClippingViewGroup &&
414- child.removeClippedSubviews &&
415- child !is ReactScrollView &&
416- child !is ReactHorizontalScrollView
417- ) {
418- // We need to workaround the issue until our changes land in core.
419- // Some views do not accept any children or have set amount and they throw
420- // when we want to brute-forcefully manipulate that.
421- // Is this ugly? Very. Do we have better option before changes land in core?
422- // I'm not aware of any.
423- try {
424- for (j in 0 until child.childCount) {
425- child.addView(View (context))
426- }
427- } catch (_: Exception ) {
428- }
429- }
430404 startTransitionRecursive(child)
431405 }
432406 }
0 commit comments