Skip to content

Commit

Permalink
Add workaround fix for facebook#35350
Browse files Browse the repository at this point in the history
  • Loading branch information
hannojg committed Jun 26, 2023
1 parent 3273d38 commit a3d53f9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/virtualized-lists/Lists/VirtualizedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import type {
LayoutEvent,
ScrollEvent,
} from 'react-native/Libraries/Types/CoreEventTypes';
import Platform from 'react-native/Libraries/Utilities/Platform';
import type {ViewToken} from './ViewabilityHelper';
import type {
Item,
Expand Down Expand Up @@ -1136,6 +1137,8 @@ class VirtualizedList extends StateSafePureComponent<Props, State> {
style: inversionStyle
? [inversionStyle, this.props.style]
: this.props.style,
internalAndroidApplyInvertedFix:
Platform.OS === 'android' && this.props.inverted,
maintainVisibleContentPosition:
this.props.maintainVisibleContentPosition != null
? {
Expand Down Expand Up @@ -1968,9 +1971,10 @@ class VirtualizedList extends StateSafePureComponent<Props, State> {
}

const styles = StyleSheet.create({
verticallyInverted: {
transform: [{scaleY: -1}],
},
verticallyInverted:
Platform.OS === 'android'
? {transform: [{scale: -1}]}
: {transform: [{scaleY: -1}]},
horizontallyInverted: {
transform: [{scaleX: -1}],
},
Expand Down

0 comments on commit a3d53f9

Please sign in to comment.