Skip to content

Commit a8a0b03

Browse files
committed
[RN72][skip-ci] Revert D9690
Summary: This reverts D9690. We no longer need it now that we've updated our version of the `react-native` package. Test Plan: Flow Reviewers: tomek
1 parent 29d547b commit a8a0b03

17 files changed

+24
-29
lines changed

native/account/logged-out-modal.react.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ class LoggedOutModal extends React.PureComponent<Props, State> {
565565
) {
566566
return;
567567
}
568-
const keyboardHeight: number = Platform.select({
568+
const keyboardHeight = Platform.select({
569569
// Android doesn't include the bottomInset in this height measurement
570570
android: event.endCoordinates.height,
571571
default: Math.max(

native/calendar/calendar.react.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ class Calendar extends React.PureComponent<Props, State> {
772772
// but it is hidden by the keyboard since it is at the bottom
773773
const { bottomInset, tabBarHeight } = this.props.dimensions;
774774
const inputBarHeight = Platform.OS === 'android' ? 37.7 : 35.5;
775-
const keyboardHeight: number = Platform.select({
775+
const keyboardHeight = Platform.select({
776776
// Android doesn't include the bottomInset in this height measurement
777777
android: event.endCoordinates.height,
778778
default: Math.max(event.endCoordinates.height - bottomInset, 0),

native/chat/settings/thread-settings-category.react.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function ThreadSettingsCategoryFooter(props: FooterProps): React.Node {
7777
);
7878
}
7979

80-
const paddingHeight: number = Platform.select({
80+
const paddingHeight = Platform.select({
8181
android: 6.5,
8282
default: 6,
8383
});

native/chat/settings/thread-settings-color.react.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { type Colors, useColors, useStyles } from '../../themes/colors.js';
1717

1818
const unboundStyles = {
1919
colorLine: {
20-
lineHeight: (Platform.select({ android: 22, default: 25 }): number),
20+
lineHeight: Platform.select({ android: 22, default: 25 }),
2121
},
2222
colorRow: {
2323
backgroundColor: 'panelForeground',

native/components/edit-setting-button.react.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function EditSettingButton(props: Props): React.Node {
4343
const styles = StyleSheet.create({
4444
editIcon: {
4545
paddingLeft: 10,
46-
paddingTop: (Platform.select({ android: 1, default: 0 }): number),
46+
paddingTop: Platform.select({ android: 1, default: 0 }),
4747
textAlign: 'right',
4848
},
4949
});

native/components/pencil-icon.react.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const unboundStyles = {
1515
editIcon: {
1616
color: 'modalForegroundSecondaryLabel',
1717
lineHeight: 20,
18-
paddingTop: (Platform.select({ android: 1, default: 0 }): number),
18+
paddingTop: Platform.select({ android: 1, default: 0 }),
1919
textAlign: 'right',
2020
},
2121
};

native/components/search.react.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ const unboundStyles = {
121121
paddingRight: 7,
122122
},
123123
inactiveSearchText: {
124-
transform: (Platform.select({
124+
transform: Platform.select({
125125
ios: [{ translateY: 1 / 3 }],
126126
default: undefined,
127-
}): ?$ReadOnlyArray<{ +translateY: number }>),
127+
}),
128128
},
129129
searchText: {
130130
color: 'listForegroundLabel',

native/crash.react.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -249,20 +249,20 @@ const styles = StyleSheet.create({
249249
},
250250
errorReportIDText: {
251251
color: 'black',
252-
fontFamily: (Platform.select({
252+
fontFamily: Platform.select({
253253
ios: 'Menlo',
254254
default: 'monospace',
255-
}): string),
255+
}),
256256
fontSize: 12,
257257
paddingRight: 8,
258258
paddingTop: 3,
259259
},
260260
errorText: {
261261
color: 'black',
262-
fontFamily: (Platform.select({
262+
fontFamily: Platform.select({
263263
ios: 'Menlo',
264264
default: 'monospace',
265-
}): string),
265+
}),
266266
},
267267
header: {
268268
color: 'black',

native/keyboard/keyboard.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type HideKeyboardCallback = (event: ?KeyboardEvent) => void;
1919

2020
const isIPhoneX =
2121
Platform.OS === 'ios' && DeviceInfo.getConstants().isIPhoneX_deprecated;
22-
const defaultKeyboardHeight: number = Platform.select({
22+
const defaultKeyboardHeight = Platform.select({
2323
ios: isIPhoneX ? 335 : 216,
2424
android: 282.28,
2525
});

native/media/camera-modal.react.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@ const styles = StyleSheet.create({
10901090
flex: 1,
10911091
},
10921092
flashButton: {
1093-
marginTop: (Platform.select({ android: 15, default: 13 }): number),
1093+
marginTop: Platform.select({ android: 15, default: 13 }),
10941094
paddingHorizontal: 10,
10951095
paddingVertical: 3,
10961096
position: 'absolute',
@@ -1135,7 +1135,7 @@ const styles = StyleSheet.create({
11351135
},
11361136
retakeButton: {
11371137
left: 20,
1138-
marginTop: (Platform.select({ android: 15, default: 15 }): number),
1138+
marginTop: Platform.select({ android: 15, default: 15 }),
11391139
paddingBottom: 3,
11401140
paddingHorizontal: 10,
11411141
position: 'absolute',

native/media/media-gallery-keyboard.react.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ class MediaGalleryKeyboard extends React.PureComponent<Props, State> {
520520

521521
const { queuedMediaURIs } = this.state;
522522
const queueCount = queuedMediaURIs ? queuedMediaURIs.size : 0;
523-
const bottomInset: number = Platform.select({
523+
const bottomInset = Platform.select({
524524
ios: -1 * this.props.dimensions.bottomInset,
525525
default: 0,
526526
});

native/media/save-media.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function useIntentionalSaveMedia(): IntentionalSaveMedia {
7676
if (result.success) {
7777
message = 'saved!';
7878
} else if (result.reason === 'save_unsupported') {
79-
const os: string = Platform.select({
79+
const os = Platform.select({
8080
ios: 'iOS',
8181
android: 'Android',
8282
default: Platform.OS,

native/navigation/community-drawer-content.react.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import {
3535
} from '../utils/drawer-utils.react.js';
3636

3737
const maxDepth = 2;
38-
const safeAreaEdges: $ReadOnlyArray<string> = Platform.select({
38+
const safeAreaEdges = Platform.select({
3939
ios: ['top'],
4040
default: ['top', 'bottom'],
4141
});

native/navigation/disconnected-bar.react.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010

1111
import { useStyles } from '../themes/colors.js';
1212

13-
const expandedHeight: number = Platform.select({
13+
const expandedHeight = Platform.select({
1414
android: 29.5,
1515
default: 27,
1616
});

native/navigation/root-navigator.react.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import type {
1212
StackRouterOptions,
1313
RouteProp,
1414
StackCardInterpolationProps,
15-
TransitionPreset,
1615
} from '@react-navigation/core';
1716
import {
1817
createNavigatorFactory,
@@ -152,7 +151,7 @@ const createRootNavigator = createNavigatorFactory<
152151
ExtraStackNavigatorProps,
153152
>(RootNavigator);
154153

155-
const baseTransitionPreset: TransitionPreset = Platform.select({
154+
const baseTransitionPreset = Platform.select({
156155
ios: TransitionPresets.ModalSlideFromBottomIOS,
157156
default: TransitionPresets.FadeFromBottomAndroid,
158157
});

native/push/in-app-notif.react.js

+3-7
Original file line numberDiff line numberDiff line change
@@ -64,31 +64,27 @@ const styles = StyleSheet.create({
6464
width: '100%',
6565
},
6666
notificationContent: {
67-
...(Platform.select({
67+
...Platform.select({
6868
ios: {
6969
marginTop: 16,
7070
marginBottom: 6,
7171
},
7272
default: {
7373
marginVertical: 16,
7474
},
75-
}): {
76-
+marginTop?: number,
77-
+marginBottom?: number,
78-
+marginVertical?: number,
7975
}),
8076
marginHorizontal: 10,
8177
},
8278
text: {
83-
...(Platform.select({
79+
...Platform.select({
8480
ios: {
8581
fontSize: 16,
8682
color: 'black',
8783
},
8884
default: {
8985
fontSize: 18,
9086
},
91-
}): { +fontSize: number, +color?: string }),
87+
}),
9288
},
9389
title: {
9490
fontWeight: 'bold',

native/utils/alert-messages.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type AlertDetails = {
77
+message: string,
88
};
99

10-
const platformStore: string = Platform.select({
10+
const platformStore = Platform.select({
1111
ios: 'App Store',
1212
android: 'Play Store',
1313
});

0 commit comments

Comments
 (0)