Skip to content

Commit c20196f

Browse files
authored
Removing forked changes that were made to support win32 (#216)
* Remove some usages of win32 that are no longer needed. * lint fix
1 parent 6bcb2c1 commit c20196f

File tree

4 files changed

+8
-28
lines changed

4 files changed

+8
-28
lines changed

Libraries/Components/TextInput/TextInputState.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ function focusTextInput(textFieldID: ?number) {
4949
.focusTextInput,
5050
null,
5151
);
52-
} else if (Platform.OS === 'win32') {
53-
UIManager.dispatchViewManagerCommand(
54-
textFieldID,
55-
UIManager.RCTView.Commands.focus,
56-
null,
57-
);
5852
}
5953
}
6054
}
@@ -79,12 +73,6 @@ function blurTextInput(textFieldID: ?number) {
7973
.blurTextInput,
8074
null,
8175
);
82-
} else if (Platform.OS === 'win32') {
83-
UIManager.dispatchViewManagerCommand(
84-
textFieldID,
85-
UIManager.RCTView.Commands.blur,
86-
null,
87-
);
8876
}
8977
}
9078
}

Libraries/StyleSheet/StyleSheet.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
const PixelRatio = require('../Utilities/PixelRatio');
1313
const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');
1414
const StyleSheetValidation = require('./StyleSheetValidation');
15-
const Platform = require('../Utilities/Platform'); // TODO(macOS ISS#2323203)
1615

1716
const flatten = require('./flattenStyle');
1817

@@ -152,10 +151,7 @@ export type ImageStyle = ____ImageStyle_Internal;
152151
*/
153152
export type DangerouslyImpreciseStyle = ____DangerouslyImpreciseStyle_Internal;
154153

155-
let hairlineWidth =
156-
Platform.OS === 'win32' || Platform.OS === 'windesktop'
157-
? 0.5
158-
: PixelRatio.roundToNearestPixel(0.4); // TODO(windows ISS)
154+
let hairlineWidth = PixelRatio.roundToNearestPixel(0.4);
159155
if (hairlineWidth === 0) {
160156
hairlineWidth = 1 / PixelRatio.get();
161157
}

Libraries/YellowBox/UI/YellowBoxList.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ const YellowBoxButton = require('./YellowBoxButton');
2020
const YellowBoxInspector = require('./YellowBoxInspector');
2121
const YellowBoxListRow = require('./YellowBoxListRow');
2222
const YellowBoxStyle = require('./YellowBoxStyle');
23-
const Platform = require('../../Utilities/Platform'); // TODO(windows ISS)
2423

2524
import type {Category} from '../Data/YellowBoxCategory';
2625
import type {Registry} from '../Data/YellowBoxRegistry';
@@ -36,13 +35,10 @@ type State = {|
3635
|};
3736

3837
const VIEWPORT_RATIO = 0.5;
39-
const MAX_ITEMS =
40-
Platform.OS === 'win32' || Platform.OS === 'windesktop'
41-
? 3
42-
: Math.floor(
43-
(Dimensions.get('window').height * VIEWPORT_RATIO) /
44-
(YellowBoxListRow.GUTTER + YellowBoxListRow.HEIGHT),
45-
); // TODO(windows ISS)
38+
const MAX_ITEMS = Math.floor(
39+
(Dimensions.get('window').height * VIEWPORT_RATIO) /
40+
(YellowBoxListRow.GUTTER + YellowBoxListRow.HEIGHT),
41+
);
4642

4743
class YellowBoxList extends React.Component<Props, State> {
4844
state = {
@@ -73,7 +69,7 @@ class YellowBoxList extends React.Component<Props, State> {
7369
}
7470

7571
const listStyle = {
76-
width: Platform.OS === 'win32' ? '85%' : undefined, // TODO(windows ISS)
72+
width: undefined,
7773
height:
7874
// Additional `0.5` so the (N + 1)th row can peek into view.
7975
Math.min(items.length, MAX_ITEMS + 0.5) *
@@ -130,7 +126,7 @@ const styles = StyleSheet.create({
130126
width: '100%',
131127
},
132128
dismissAll: {
133-
bottom: Platform.OS === 'win32' ? 0 : '100%', // TODO(windows ISS)
129+
bottom: '100%',
134130
flexDirection: 'row',
135131
justifyContent: 'flex-end',
136132
paddingBottom: 4,

metro.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ if (
5656
},
5757
resolver: {
5858
hasteImplModulePath: require.resolve('./jest/hasteImpl'),
59-
platforms: ['win32', 'ios', 'macos', 'android'],
59+
platforms: ['ios', 'macos', 'android'],
6060
},
6161
transformer: {
6262
assetRegistryPath: require.resolve('./Libraries/Image/AssetRegistry'),

0 commit comments

Comments
 (0)