Skip to content

Commit

Permalink
second attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
vonovak committed Apr 6, 2020
1 parent 33d16d0 commit fbe283f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions Libraries/Components/Pressable/useAndroidRippleForView.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,10 @@ export default function useAndroidRippleForView(
|}>,
|}> {
const {color, borderless, radius} = rippleConfig ?? {};
const normalizedBorderless = borderless === true;

return useMemo(() => {
if (
Platform.OS === 'android' &&
Platform.Version >= 21 &&
(color != null || borderless != null || radius != null)
) {
if (Platform.OS === 'android' && Platform.Version >= 21) {
const processedColor = processColor(color);
invariant(
processedColor == null || typeof processedColor === 'number',
Expand All @@ -66,7 +63,7 @@ export default function useAndroidRippleForView(
nativeBackgroundAndroid: {
type: 'RippleAndroid',
color: processedColor,
borderless: borderless === true,
borderless: normalizedBorderless,
rippleRadius: radius,
},
},
Expand Down Expand Up @@ -100,5 +97,5 @@ export default function useAndroidRippleForView(
};
}
return null;
}, [color, borderless, radius, viewRef]);
}, [color, normalizedBorderless, radius, viewRef]);
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void onCreate() {
ReactFontManager.getInstance().addCustomFont(this, "Rubik", R.font.rubik);
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
// initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
}

@Override
Expand Down

0 comments on commit fbe283f

Please sign in to comment.