Page MenuHomePhabricator

D10046.diff
No OneTemporary

D10046.diff

diff --git a/native/account/logged-out-modal.react.js b/native/account/logged-out-modal.react.js
--- a/native/account/logged-out-modal.react.js
+++ b/native/account/logged-out-modal.react.js
@@ -564,7 +564,7 @@
) {
return;
}
- const keyboardHeight = Platform.select({
+ const keyboardHeight: number = Platform.select({
// Android doesn't include the bottomInset in this height measurement
android: event.endCoordinates.height,
default: Math.max(
diff --git a/native/calendar/calendar.react.js b/native/calendar/calendar.react.js
--- a/native/calendar/calendar.react.js
+++ b/native/calendar/calendar.react.js
@@ -772,7 +772,7 @@
// but it is hidden by the keyboard since it is at the bottom
const { bottomInset, tabBarHeight } = this.props.dimensions;
const inputBarHeight = Platform.OS === 'android' ? 37.7 : 35.5;
- const keyboardHeight = Platform.select({
+ const keyboardHeight: number = Platform.select({
// Android doesn't include the bottomInset in this height measurement
android: event.endCoordinates.height,
default: Math.max(event.endCoordinates.height - bottomInset, 0),
diff --git a/native/chat/settings/thread-settings-category.react.js b/native/chat/settings/thread-settings-category.react.js
--- a/native/chat/settings/thread-settings-category.react.js
+++ b/native/chat/settings/thread-settings-category.react.js
@@ -77,7 +77,7 @@
);
}
-const paddingHeight = Platform.select({
+const paddingHeight: number = Platform.select({
android: 6.5,
default: 6,
});
diff --git a/native/chat/settings/thread-settings-color.react.js b/native/chat/settings/thread-settings-color.react.js
--- a/native/chat/settings/thread-settings-color.react.js
+++ b/native/chat/settings/thread-settings-color.react.js
@@ -18,7 +18,7 @@
const unboundStyles = {
colorLine: {
- lineHeight: Platform.select({ android: 22, default: 25 }),
+ lineHeight: (Platform.select({ android: 22, default: 25 }): number),
},
colorRow: {
backgroundColor: 'panelForeground',
diff --git a/native/components/edit-setting-button.react.js b/native/components/edit-setting-button.react.js
--- a/native/components/edit-setting-button.react.js
+++ b/native/components/edit-setting-button.react.js
@@ -43,7 +43,7 @@
const styles = StyleSheet.create({
editIcon: {
paddingLeft: 10,
- paddingTop: Platform.select({ android: 1, default: 0 }),
+ paddingTop: (Platform.select({ android: 1, default: 0 }): number),
textAlign: 'right',
},
});
diff --git a/native/components/pencil-icon.react.js b/native/components/pencil-icon.react.js
--- a/native/components/pencil-icon.react.js
+++ b/native/components/pencil-icon.react.js
@@ -15,7 +15,7 @@
editIcon: {
color: 'modalForegroundSecondaryLabel',
lineHeight: 20,
- paddingTop: Platform.select({ android: 1, default: 0 }),
+ paddingTop: (Platform.select({ android: 1, default: 0 }): number),
textAlign: 'right',
},
};
diff --git a/native/components/search.react.js b/native/components/search.react.js
--- a/native/components/search.react.js
+++ b/native/components/search.react.js
@@ -121,10 +121,10 @@
paddingRight: 7,
},
inactiveSearchText: {
- transform: Platform.select({
+ transform: (Platform.select({
ios: [{ translateY: 1 / 3 }],
default: undefined,
- }),
+ }): ?$ReadOnlyArray<{ +translateY: number }>),
},
searchText: {
color: 'listForegroundLabel',
diff --git a/native/crash.react.js b/native/crash.react.js
--- a/native/crash.react.js
+++ b/native/crash.react.js
@@ -243,20 +243,20 @@
},
errorReportIDText: {
color: 'black',
- fontFamily: Platform.select({
+ fontFamily: (Platform.select({
ios: 'Menlo',
default: 'monospace',
- }),
+ }): string),
fontSize: 12,
paddingRight: 8,
paddingTop: 3,
},
errorText: {
color: 'black',
- fontFamily: Platform.select({
+ fontFamily: (Platform.select({
ios: 'Menlo',
default: 'monospace',
- }),
+ }): string),
},
header: {
color: 'black',
diff --git a/native/keyboard/keyboard.js b/native/keyboard/keyboard.js
--- a/native/keyboard/keyboard.js
+++ b/native/keyboard/keyboard.js
@@ -19,7 +19,7 @@
const isIPhoneX =
Platform.OS === 'ios' && DeviceInfo.getConstants().isIPhoneX_deprecated;
-const defaultKeyboardHeight = Platform.select({
+const defaultKeyboardHeight: number = Platform.select({
ios: isIPhoneX ? 335 : 216,
android: 282.28,
});
diff --git a/native/media/camera-modal.react.js b/native/media/camera-modal.react.js
--- a/native/media/camera-modal.react.js
+++ b/native/media/camera-modal.react.js
@@ -1088,7 +1088,7 @@
flex: 1,
},
flashButton: {
- marginTop: Platform.select({ android: 15, default: 13 }),
+ marginTop: (Platform.select({ android: 15, default: 13 }): number),
paddingHorizontal: 10,
paddingVertical: 3,
position: 'absolute',
@@ -1133,7 +1133,7 @@
},
retakeButton: {
left: 20,
- marginTop: Platform.select({ android: 15, default: 15 }),
+ marginTop: (Platform.select({ android: 15, default: 15 }): number),
paddingBottom: 3,
paddingHorizontal: 10,
position: 'absolute',
diff --git a/native/media/media-gallery-keyboard.react.js b/native/media/media-gallery-keyboard.react.js
--- a/native/media/media-gallery-keyboard.react.js
+++ b/native/media/media-gallery-keyboard.react.js
@@ -521,7 +521,7 @@
const { queuedMediaURIs } = this.state;
const queueCount = queuedMediaURIs ? queuedMediaURIs.size : 0;
- const bottomInset = Platform.select({
+ const bottomInset: number = Platform.select({
ios: -1 * this.props.dimensions.bottomInset,
default: 0,
});
diff --git a/native/media/save-media.js b/native/media/save-media.js
--- a/native/media/save-media.js
+++ b/native/media/save-media.js
@@ -76,7 +76,7 @@
if (result.success) {
message = 'saved!';
} else if (result.reason === 'save_unsupported') {
- const os = Platform.select({
+ const os: string = Platform.select({
ios: 'iOS',
android: 'Android',
default: Platform.OS,
diff --git a/native/navigation/community-drawer-content.react.js b/native/navigation/community-drawer-content.react.js
--- a/native/navigation/community-drawer-content.react.js
+++ b/native/navigation/community-drawer-content.react.js
@@ -35,7 +35,7 @@
} from '../utils/drawer-utils.react.js';
const maxDepth = 2;
-const safeAreaEdges = Platform.select({
+const safeAreaEdges: $ReadOnlyArray<string> = Platform.select({
ios: ['top'],
default: ['top', 'bottom'],
});
diff --git a/native/navigation/disconnected-bar.react.js b/native/navigation/disconnected-bar.react.js
--- a/native/navigation/disconnected-bar.react.js
+++ b/native/navigation/disconnected-bar.react.js
@@ -10,7 +10,7 @@
import { useStyles } from '../themes/colors.js';
-const expandedHeight = Platform.select({
+const expandedHeight: number = Platform.select({
android: 29.5,
default: 27,
});
diff --git a/native/navigation/root-navigator.react.js b/native/navigation/root-navigator.react.js
--- a/native/navigation/root-navigator.react.js
+++ b/native/navigation/root-navigator.react.js
@@ -12,6 +12,7 @@
StackRouterOptions,
RouteProp,
StackCardInterpolationProps,
+ TransitionPreset,
} from '@react-navigation/core';
import {
createNavigatorFactory,
@@ -151,7 +152,7 @@
ExtraStackNavigatorProps,
>(RootNavigator);
-const baseTransitionPreset = Platform.select({
+const baseTransitionPreset: TransitionPreset = Platform.select({
ios: TransitionPresets.ModalSlideFromBottomIOS,
default: TransitionPresets.FadeFromBottomAndroid,
});
diff --git a/native/push/in-app-notif.react.js b/native/push/in-app-notif.react.js
--- a/native/push/in-app-notif.react.js
+++ b/native/push/in-app-notif.react.js
@@ -64,7 +64,7 @@
width: '100%',
},
notificationContent: {
- ...Platform.select({
+ ...(Platform.select({
ios: {
marginTop: 16,
marginBottom: 6,
@@ -72,11 +72,15 @@
default: {
marginVertical: 16,
},
+ }): {
+ +marginTop?: number,
+ +marginBottom?: number,
+ +marginVertical?: number,
}),
marginHorizontal: 10,
},
text: {
- ...Platform.select({
+ ...(Platform.select({
ios: {
fontSize: 16,
color: 'black',
@@ -84,7 +88,7 @@
default: {
fontSize: 18,
},
- }),
+ }): { +fontSize: number, +color?: string }),
},
title: {
fontWeight: 'bold',
diff --git a/native/utils/alert-messages.js b/native/utils/alert-messages.js
--- a/native/utils/alert-messages.js
+++ b/native/utils/alert-messages.js
@@ -7,7 +7,7 @@
+message: string,
};
-const platformStore = Platform.select({
+const platformStore: string = Platform.select({
ios: 'App Store',
android: 'Play Store',
});

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 3:42 AM (21 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2587590
Default Alt Text
D10046.diff (8 KB)

Event Timeline