Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions packages/block-library/src/embed/embed-loading.native.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { ActivityIndicator, View, Platform, PlatformColor } from 'react-native';
import { ActivityIndicator, View } from 'react-native';

/**
* WordPress dependencies
Expand All @@ -19,16 +19,9 @@ const EmbedLoading = () => {
styles[ 'embed-preview__loading--dark' ]
);

const activityIndicatorColor = Platform.select( {
ios: '#999999', // default color on iOS
// ActivityIndicator is blank and does not show up unless explicit color prop is provided.
// See https://github.com/facebook/react-native/pull/30057
android: PlatformColor( '?attr/colorControlActivated' ),
} );

return (
<View style={ style }>
<ActivityIndicator animating color={ activityIndicatorColor } />
<ActivityIndicator animating />
</View>
);
};
Expand Down
25 changes: 25 additions & 0 deletions patches/react-native+0.64.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/node_modules/react-native/Libraries/Components/ActivityIndicator/ActivityIndicator.js b/node_modules/react-native/Libraries/Components/ActivityIndicator/ActivityIndicator.js
index 52cbda4..3e3b71e 100644
--- a/node_modules/react-native/Libraries/Components/ActivityIndicator/ActivityIndicator.js
+++ b/node_modules/react-native/Libraries/Components/ActivityIndicator/ActivityIndicator.js
@@ -14,6 +14,7 @@
const Platform = require('../../Utilities/Platform');
const React = require('react');
const StyleSheet = require('../../StyleSheet/StyleSheet');
+const {PlatformColor} = require('../../StyleSheet/PlatformColorValueTypes');
const View = require('../View/View');
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
import type {ViewProps} from '../View/ViewPropTypes';
@@ -183,7 +184,11 @@ ActivityIndicatorWithRef.displayName = 'ActivityIndicator';
* and run Flow. */
ActivityIndicatorWithRef.defaultProps = {
animating: true,
- color: Platform.OS === 'ios' ? GRAY : null,
+ color: Platform.select({
+ ios: GRAY,
+ android: PlatformColor('?attr/colorControlActivated'),
+ default: null,
+ }),
hidesWhenStopped: true,
size: 'small',
};