author int64 658 755k | date stringlengths 19 19 | timezone int64 -46,800 43.2k | hash stringlengths 40 40 | message stringlengths 5 490 | mods list | language stringclasses 20 values | license stringclasses 3 values | repo stringlengths 5 68 | original_message stringlengths 12 491 |
|---|---|---|---|---|---|---|---|---|---|
129,187 | 29.05.2020 17:26:03 | 14,400 | 7b8333bdc69a0e1906dcface1d611693165b1b4d | [native] Fix delay in CalendarInputBar dismissing after Entry edit | [
{
"change_type": "MODIFY",
"old_path": "native/calendar/calendar.react.js",
"new_path": "native/calendar/calendar.react.js",
"diff": "@@ -151,6 +151,7 @@ type State = {|\nlistDataWithHeights: ?$ReadOnlyArray<CalendarItemWithHeight>,\nreadyToShowList: boolean,\nextraData: ExtraData,\n+ currentlyEditing: $ReadOnlyArray<string>,\n|};\nclass Calendar extends React.PureComponent<Props, State> {\nstatic propTypes = {\n@@ -224,7 +225,6 @@ class Calendar extends React.PureComponent<Props, State> {\nbottomLoaderWaitingToLeaveView = true;\n// We keep refs to the entries so CalendarInputBar can save them\nentryRefs = new Map();\n- currentlyEditing = new Set();\nconstructor(props: Props) {\nsuper(props);\n@@ -240,6 +240,7 @@ class Calendar extends React.PureComponent<Props, State> {\nlistDataWithHeights: null,\nreadyToShowList: false,\nextraData: this.latestExtraData,\n+ currentlyEditing: [],\n};\n}\n@@ -745,7 +746,7 @@ class Calendar extends React.PureComponent<Props, State> {\n<ContentLoading fillType=\"absolute\" colors={this.props.colors} />\n);\n}\n- const disableInputBar = this.currentlyEditing.size === 0;\n+ const disableInputBar = this.state.currentlyEditing.length === 0;\nreturn (\n<SafeAreaView style={this.props.styles.container}>\n<DisconnectedBar visible={this.props.calendarActive} />\n@@ -862,12 +863,22 @@ class Calendar extends React.PureComponent<Props, State> {\n} else {\nthis.lastEntryKeyActive = key;\n}\n- this.currentlyEditing.add(key);\n+ const newCurrentlyEditing = [\n+ ...new Set([...this.state.currentlyEditing, key]),\n+ ];\n+ if (newCurrentlyEditing.length > this.state.currentlyEditing.length) {\n+ this.setState({ currentlyEditing: newCurrentlyEditing });\n+ }\n};\nonConcludeEntryEditMode = (entryInfo: EntryInfoWithHeight) => {\nconst key = entryKey(entryInfo);\n- this.currentlyEditing.delete(key);\n+ const newCurrentlyEditing = this.state.currentlyEditing.filter(\n+ k => k !== key,\n+ );\n+ if (newCurrentlyEditing.length < this.state.currentlyEditing.length) {\n+ this.setState({ currentlyEditing: newCurrentlyEditing });\n+ }\n};\nkeyboardShow = (event: KeyboardEvent) => {\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Fix delay in CalendarInputBar dismissing after Entry edit |
129,187 | 31.05.2020 10:45:41 | 14,400 | 1d6d8f997cfb3aa014694b557ea5dc4826e727e9 | [native] Reduce number of sections in libdefs to 2 | [
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_vx.x.x.js",
"diff": "@@ -1652,20 +1652,9 @@ declare module '@react-navigation/bottom-tabs' {\n|};\n//---------------------------------------------------------------------------\n- // SECTION 2: UNIQUE TYPE DEFINITIONS\n- // This section contains exported types that are not present in any other\n- // React Navigation libdef.\n- //---------------------------------------------------------------------------\n-\n- declare export type BottomTabViewProps = {|\n- ...BottomTabNavigationConfig,\n- ...BottomTabNavigationBuilderResult,\n- |};\n-\n- //---------------------------------------------------------------------------\n- // SECTION 3: EXPORTED MODULE\n- // This is the only section that types exports. Other sections export types,\n- // but this section types the module's exports.\n+ // SECTION 2: EXPORTED MODULE\n+ // This section defines the module exports and contains exported types that\n+ // are not present in any other React Navigation libdef.\n//---------------------------------------------------------------------------\ndeclare export var createBottomTabNavigator: CreateNavigator<\n@@ -1677,6 +1666,10 @@ declare module '@react-navigation/bottom-tabs' {\ndeclare export var BottomTabBar: React$ComponentType<BottomTabBarProps>;\n+ declare export type BottomTabViewProps = {|\n+ ...BottomTabNavigationConfig,\n+ ...BottomTabNavigationBuilderResult,\n+ |};\ndeclare export var BottomTabView: React$ComponentType<BottomTabViewProps>;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/material-bottom-tabs_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/material-bottom-tabs_vx.x.x.js",
"diff": "@@ -1652,36 +1652,28 @@ declare module '@react-navigation/material-bottom-tabs' {\n|};\n//---------------------------------------------------------------------------\n- // SECTION 2: UNIQUE TYPE DEFINITIONS\n- // This section contains exported types that are not present in any other\n- // React Navigation libdef.\n+ // SECTION 2: EXPORTED MODULE\n+ // This section defines the module exports and contains exported types that\n+ // are not present in any other React Navigation libdef.\n//---------------------------------------------------------------------------\n+ declare export var createMaterialBottomTabNavigator: CreateNavigator<\n+ TabNavigationState,\n+ MaterialBottomTabOptions,\n+ MaterialBottomTabNavigationEventMap,\n+ ExtraMaterialBottomTabNavigatorProps,\n+ >;\n+\ndeclare export type MaterialBottomTabDescriptor = Descriptor<\nMaterialBottomTabNavigationProp<>,\nMaterialBottomTabOptions,\n>;\n-\ndeclare export type MaterialBottomTabViewProps = {|\n...MaterialBottomTabNavigationConfig,\n+state: TabNavigationState,\n+navigation: MaterialBottomTabNavigationProp<>,\n+descriptors: {| +[key: string]: MaterialBottomTabDescriptor |},\n|};\n-\n- //---------------------------------------------------------------------------\n- // SECTION 3: EXPORTED MODULE\n- // This is the only section that types exports. Other sections export types,\n- // but this section types the module's exports.\n- //---------------------------------------------------------------------------\n-\n- declare export var createMaterialBottomTabNavigator: CreateNavigator<\n- TabNavigationState,\n- MaterialBottomTabOptions,\n- MaterialBottomTabNavigationEventMap,\n- ExtraMaterialBottomTabNavigatorProps,\n- >;\n-\ndeclare export var MaterialBottomTabView: React$ComponentType<\nMaterialBottomTabViewProps,\n>;\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_vx.x.x.js",
"diff": "@@ -1652,20 +1652,9 @@ declare module '@react-navigation/material-top-tabs' {\n|};\n//---------------------------------------------------------------------------\n- // SECTION 2: UNIQUE TYPE DEFINITIONS\n- // This section contains exported types that are not present in any other\n- // React Navigation libdef.\n- //---------------------------------------------------------------------------\n-\n- declare export type MaterialTopTabViewProps = {|\n- ...MaterialTopTabNavigationConfig,\n- ...MaterialTopTabNavigationBuilderResult,\n- |};\n-\n- //---------------------------------------------------------------------------\n- // SECTION 3: EXPORTED MODULE\n- // This is the only section that types exports. Other sections export types,\n- // but this section types the module's exports.\n+ // SECTION 2: EXPORTED MODULE\n+ // This section defines the module exports and contains exported types that\n+ // are not present in any other React Navigation libdef.\n//---------------------------------------------------------------------------\ndeclare export var createMaterialTopTabNavigator: CreateNavigator<\n@@ -1675,6 +1664,10 @@ declare module '@react-navigation/material-top-tabs' {\nExtraMaterialTopTabNavigatorProps,\n>;\n+ declare export type MaterialTopTabViewProps = {|\n+ ...MaterialTopTabNavigationConfig,\n+ ...MaterialTopTabNavigationBuilderResult,\n+ |};\ndeclare export var MaterialTopTabView: React$ComponentType<\nMaterialTopTabViewProps,\n>;\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/native_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/native_vx.x.x.js",
"diff": "@@ -1652,52 +1652,9 @@ declare module '@react-navigation/native' {\n|};\n//---------------------------------------------------------------------------\n- // SECTION 2: UNIQUE TYPE DEFINITIONS\n- // This section contains exported types that are not present in any other\n- // React Navigation libdef.\n- //---------------------------------------------------------------------------\n-\n- declare export type Theme = {|\n- +dark: boolean,\n- +colors: {|\n- +primary: string,\n- +background: string,\n- +card: string,\n- +text: string,\n- +border: string,\n- |},\n- |};\n-\n- declare export type LinkingConfig = {|\n- +[routeName: string]:\n- | string\n- | {|\n- +path?: string,\n- +parse?: {| +[param: string]: string => mixed |},\n- +screens?: LinkingConfig,\n- +initialRouteName?: string,\n- +stringify?: {| +[param: string]: mixed => string |},\n- |},\n- |};\n-\n- declare export type LinkingOptions = {|\n- +enabled?: boolean,\n- +prefixes: $ReadOnlyArray<string>,\n- +config?: LinkingConfig,\n- +getStateFromPath?: (\n- path: string,\n- config?: LinkingConfig,\n- ) => PossiblyStaleNavigationState,\n- +getPathFromState?: (\n- state?: ?PossiblyStaleNavigationState,\n- config?: LinkingConfig,\n- ) => string,\n- |};\n-\n- //---------------------------------------------------------------------------\n- // SECTION 3: EXPORTED MODULE\n- // This is the only section that types exports. Other sections export types,\n- // but this section types the module's exports.\n+ // SECTION 2: EXPORTED MODULE\n+ // This section defines the module exports and contains exported types that\n+ // are not present in any other React Navigation libdef.\n//---------------------------------------------------------------------------\ndeclare type NavigateActionCreator = {|\n@@ -1707,7 +1664,6 @@ declare module '@react-navigation/native' {\n| {| +name: string, +key?: string, +params?: ScreenParams |},\n): NavigateAction,\n|};\n-\ndeclare export var CommonActions: {|\n+navigate: NavigateActionCreator,\n+goBack: () => BackAction,\n@@ -1715,6 +1671,17 @@ declare module '@react-navigation/native' {\n+setParams: (params: ScreenParams) => SetParamsAction,\n|};\n+ declare export var StackRouter: RouterFactory<\n+ StackNavigationState,\n+ StackAction,\n+ StackRouterOptions,\n+ >;\n+ declare export var TabRouter: RouterFactory<\n+ TabNavigationState,\n+ TabAction,\n+ TabRouterOptions,\n+ >;\n+\ndeclare export var createNavigatorFactory: <\nState: NavigationState,\nScreenOptions: {},\n@@ -1732,18 +1699,6 @@ declare module '@react-navigation/native' {\n|}>,\n) => CreateNavigator<State, ScreenOptions, EventMap, ExtraNavigatorProps>;\n- declare export var StackRouter: RouterFactory<\n- StackNavigationState,\n- StackAction,\n- StackRouterOptions,\n- >;\n-\n- declare export var TabRouter: RouterFactory<\n- TabNavigationState,\n- TabAction,\n- TabRouterOptions,\n- >;\n-\ndeclare export var useNavigationBuilder: <\nState: NavigationState,\nAction: GenericNavigationAction,\n@@ -1767,6 +1722,44 @@ declare module '@react-navigation/native' {\n?NavigationHelpers<ParamListBase>,\n>;\n+ declare export type Theme = {|\n+ +dark: boolean,\n+ +colors: {|\n+ +primary: string,\n+ +background: string,\n+ +card: string,\n+ +text: string,\n+ +border: string,\n+ |},\n+ |};\n+ declare export var DefaultTheme: Theme & { +dark: false };\n+ declare export var DarkTheme: Theme & { +dark: true };\n+\n+ declare export type LinkingConfig = {|\n+ +[routeName: string]:\n+ | string\n+ | {|\n+ +path?: string,\n+ +parse?: {| +[param: string]: string => mixed |},\n+ +screens?: LinkingConfig,\n+ +initialRouteName?: string,\n+ +stringify?: {| +[param: string]: mixed => string |},\n+ |},\n+ |};\n+ declare export type LinkingOptions = {|\n+ +enabled?: boolean,\n+ +prefixes: $ReadOnlyArray<string>,\n+ +config?: LinkingConfig,\n+ +getStateFromPath?: (\n+ path: string,\n+ config?: LinkingConfig,\n+ ) => PossiblyStaleNavigationState,\n+ +getPathFromState?: (\n+ state?: ?PossiblyStaleNavigationState,\n+ config?: LinkingConfig,\n+ ) => string,\n+ |};\n+\ndeclare export var NavigationContainer: React$AbstractComponent<\n{|\n+theme?: Theme,\n@@ -1789,7 +1782,4 @@ declare module '@react-navigation/native' {\n|},\n>;\n- declare export var DefaultTheme: Theme & { +dark: false };\n- declare export var DarkTheme: Theme & { +dark: true };\n-\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/stack_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/stack_vx.x.x.js",
"diff": "@@ -1652,23 +1652,9 @@ declare module '@react-navigation/stack' {\n|};\n//---------------------------------------------------------------------------\n- // SECTION 2: UNIQUE TYPE DEFINITIONS\n- // This section contains exported types that are not present in any other\n- // React Navigation libdef.\n- //---------------------------------------------------------------------------\n-\n- declare export type StackBackButtonProps = $Shape<{|\n- ...StackHeaderLeftButtonProps,\n- +disabled: boolean,\n- +accessibilityLabel: string,\n- |}>;\n-\n- declare export type StackHeaderTitleProps = $Shape<StackHeaderTitleInputBase>;\n-\n- //---------------------------------------------------------------------------\n- // SECTION 3: EXPORTED MODULE\n- // This is the only section that types exports. Other sections export types,\n- // but this section types the module's exports.\n+ // SECTION 2: EXPORTED MODULE\n+ // This section defines the module exports and contains exported types that\n+ // are not present in any other React Navigation libdef.\n//---------------------------------------------------------------------------\ndeclare export var StackView: React$ComponentType<{|\n@@ -1686,7 +1672,15 @@ declare module '@react-navigation/stack' {\n>;\ndeclare export var Header: React$ComponentType<StackHeaderProps>;\n+\n+ declare export type StackHeaderTitleProps = $Shape<StackHeaderTitleInputBase>;\ndeclare export var HeaderTitle: React$ComponentType<StackHeaderTitleProps>;\n+\n+ declare export type StackBackButtonProps = $Shape<{|\n+ ...StackHeaderLeftButtonProps,\n+ +disabled: boolean,\n+ +accessibilityLabel: string,\n+ |}>;\ndeclare export var HeaderBackButton: React$ComponentType<\nStackBackButtonProps,\n>;\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Reduce number of sections in @react-navigation libdefs to 2 |
129,187 | 31.05.2020 13:28:00 | 14,400 | 7347b0b5eb91094c7d7a8c097fbb8ce8bd5dfd5e | [native] Finish typing | [
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_vx.x.x.js",
"diff": "@@ -298,6 +298,19 @@ declare module '@react-navigation/bottom-tabs' {\ntouchSoundDisabled?: ?boolean,\n|}>;\n+ // Copied from react-native/Libraries/Image/ImageSource.js\n+ declare type ImageURISource = $ReadOnly<{\n+ uri?: ?string,\n+ bundle?: ?string,\n+ method?: ?string,\n+ headers?: ?Object,\n+ body?: ?string,\n+ cache?: ?('default' | 'reload' | 'force-cache' | 'only-if-cached'),\n+ width?: ?number,\n+ height?: ?number,\n+ scale?: ?number,\n+ }>;\n+\n/**\n* The following is copied from react-native-gesture-handler's libdef\n*/\n@@ -875,7 +888,7 @@ declare module '@react-navigation/bottom-tabs' {\n|};\ndeclare export type ExtraNavigatorPropsBase = {\n...$Exact<DefaultRouterOptions>,\n- +children?: React.Node,\n+ +children?: React$Node,\n...\n};\ndeclare export type NavigatorPropsBase<ScreenOptions: {}, NavProp> = {\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/material-bottom-tabs_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/material-bottom-tabs_vx.x.x.js",
"diff": "@@ -298,6 +298,19 @@ declare module '@react-navigation/material-bottom-tabs' {\ntouchSoundDisabled?: ?boolean,\n|}>;\n+ // Copied from react-native/Libraries/Image/ImageSource.js\n+ declare type ImageURISource = $ReadOnly<{\n+ uri?: ?string,\n+ bundle?: ?string,\n+ method?: ?string,\n+ headers?: ?Object,\n+ body?: ?string,\n+ cache?: ?('default' | 'reload' | 'force-cache' | 'only-if-cached'),\n+ width?: ?number,\n+ height?: ?number,\n+ scale?: ?number,\n+ }>;\n+\n/**\n* The following is copied from react-native-gesture-handler's libdef\n*/\n@@ -875,7 +888,7 @@ declare module '@react-navigation/material-bottom-tabs' {\n|};\ndeclare export type ExtraNavigatorPropsBase = {\n...$Exact<DefaultRouterOptions>,\n- +children?: React.Node,\n+ +children?: React$Node,\n...\n};\ndeclare export type NavigatorPropsBase<ScreenOptions: {}, NavProp> = {\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_vx.x.x.js",
"diff": "@@ -298,6 +298,19 @@ declare module '@react-navigation/material-top-tabs' {\ntouchSoundDisabled?: ?boolean,\n|}>;\n+ // Copied from react-native/Libraries/Image/ImageSource.js\n+ declare type ImageURISource = $ReadOnly<{\n+ uri?: ?string,\n+ bundle?: ?string,\n+ method?: ?string,\n+ headers?: ?Object,\n+ body?: ?string,\n+ cache?: ?('default' | 'reload' | 'force-cache' | 'only-if-cached'),\n+ width?: ?number,\n+ height?: ?number,\n+ scale?: ?number,\n+ }>;\n+\n/**\n* The following is copied from react-native-gesture-handler's libdef\n*/\n@@ -875,7 +888,7 @@ declare module '@react-navigation/material-top-tabs' {\n|};\ndeclare export type ExtraNavigatorPropsBase = {\n...$Exact<DefaultRouterOptions>,\n- +children?: React.Node,\n+ +children?: React$Node,\n...\n};\ndeclare export type NavigatorPropsBase<ScreenOptions: {}, NavProp> = {\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/native_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/native_vx.x.x.js",
"diff": "@@ -298,6 +298,19 @@ declare module '@react-navigation/native' {\ntouchSoundDisabled?: ?boolean,\n|}>;\n+ // Copied from react-native/Libraries/Image/ImageSource.js\n+ declare type ImageURISource = $ReadOnly<{\n+ uri?: ?string,\n+ bundle?: ?string,\n+ method?: ?string,\n+ headers?: ?Object,\n+ body?: ?string,\n+ cache?: ?('default' | 'reload' | 'force-cache' | 'only-if-cached'),\n+ width?: ?number,\n+ height?: ?number,\n+ scale?: ?number,\n+ }>;\n+\n/**\n* The following is copied from react-native-gesture-handler's libdef\n*/\n@@ -875,7 +888,7 @@ declare module '@react-navigation/native' {\n|};\ndeclare export type ExtraNavigatorPropsBase = {\n...$Exact<DefaultRouterOptions>,\n- +children?: React.Node,\n+ +children?: React$Node,\n...\n};\ndeclare export type NavigatorPropsBase<ScreenOptions: {}, NavProp> = {\n@@ -1710,7 +1723,7 @@ declare module '@react-navigation/native' {\noptions: {|\n...$Exact<RouterOptions>,\n...ScreenOptionsProp<ScreenOptions, NavProp>,\n- children?: React.Node,\n+ children?: React$Node,\n|},\n) => {|\n+state: State,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/stack_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/stack_vx.x.x.js",
"diff": "@@ -298,6 +298,19 @@ declare module '@react-navigation/stack' {\ntouchSoundDisabled?: ?boolean,\n|}>;\n+ // Copied from react-native/Libraries/Image/ImageSource.js\n+ declare type ImageURISource = $ReadOnly<{\n+ uri?: ?string,\n+ bundle?: ?string,\n+ method?: ?string,\n+ headers?: ?Object,\n+ body?: ?string,\n+ cache?: ?('default' | 'reload' | 'force-cache' | 'only-if-cached'),\n+ width?: ?number,\n+ height?: ?number,\n+ scale?: ?number,\n+ }>;\n+\n/**\n* The following is copied from react-native-gesture-handler's libdef\n*/\n@@ -875,7 +888,7 @@ declare module '@react-navigation/stack' {\n|};\ndeclare export type ExtraNavigatorPropsBase = {\n...$Exact<DefaultRouterOptions>,\n- +children?: React.Node,\n+ +children?: React$Node,\n...\n};\ndeclare export type NavigatorPropsBase<ScreenOptions: {}, NavProp> = {\n@@ -1676,15 +1689,47 @@ declare module '@react-navigation/stack' {\ndeclare export type StackHeaderTitleProps = $Shape<StackHeaderTitleInputBase>;\ndeclare export var HeaderTitle: React$ComponentType<StackHeaderTitleProps>;\n- declare export type StackBackButtonProps = $Shape<{|\n+ declare export type HeaderBackButtonProps = $Shape<{|\n...StackHeaderLeftButtonProps,\n+disabled: boolean,\n+accessibilityLabel: string,\n|}>;\ndeclare export var HeaderBackButton: React$ComponentType<\n- StackBackButtonProps,\n+ HeaderBackButtonProps,\n>;\n+ declare export type HeaderBackgroundProps = $Shape<{\n+ +children: React$Node,\n+ +style: AnimatedViewStyleProp,\n+ }>;\n+ declare export var HeaderBackground: React$ComponentType<\n+ HeaderBackgroundProps,\n+ >;\n+\n+ declare export var CardStyleInterpolators: {|\n+ +forHorizontalIOS: StackCardStyleInterpolator,\n+ +forVerticalIOS: StackCardStyleInterpolator,\n+ +forModalPresentationIOS: StackCardStyleInterpolator,\n+ +forFadeFromBottomAndroid: StackCardStyleInterpolator,\n+ +forRevealFromBottomAndroid: StackCardStyleInterpolator,\n+ +forScaleFromCenterAndroid: StackCardStyleInterpolator,\n+ +forNoAnimation: StackCardStyleInterpolator,\n+ |};\n+ declare export var HeaderStyleInterpolators: {|\n+ +forUIKit: StackHeaderStyleInterpolator,\n+ +forFade: StackHeaderStyleInterpolator,\n+ +forSlideLeft: StackHeaderStyleInterpolator,\n+ +forSlideRight: StackHeaderStyleInterpolator,\n+ +forSlideUp: StackHeaderStyleInterpolator,\n+ +forNoAnimation: StackHeaderStyleInterpolator,\n+ |};\n+ declare export var TransitionSpecs: {|\n+ +TransitionIOSSpec: TransitionSpec,\n+ +FadeInFromBottomAndroidSpec: TransitionSpec,\n+ +FadeOutToBottomAndroidSpec: TransitionSpec,\n+ +RevealFromBottomAndroidSpec: TransitionSpec,\n+ +ScaleFromCenterAndroidSpec: TransitionSpec,\n+ |};\ndeclare export var TransitionPresets: {|\n+SlideFromRightIOS: TransitionPreset,\n+ModalSlideFromBottomIOS: TransitionPreset,\n@@ -1696,4 +1741,22 @@ declare module '@react-navigation/stack' {\n+ModalTransition: TransitionPreset,\n|};\n+ declare export var Assets: $ReadOnlyArray<ImageURISource>;\n+\n+ declare export var CardAnimationContext: React$Context<\n+ ?StackCardInterpolationProps,\n+ >;\n+ declare export function useCardAnimation(): StackCardInterpolationProps\n+\n+ declare export var HeaderHeightContext: React$Context<?number>;\n+ declare export function useHeaderHeight(): number;\n+\n+ declare type GestureHandlerRef = React$ElementRef<\n+ React$ComponentType<GestureHandlerProps>,\n+ >;\n+ declare export var GestureHandlerRefContext: React$Context<\n+ ?GestureHandlerRef,\n+ >;\n+ declare export function useGestureHandlerRef(): GestureHandlerRef;\n+\n}\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Finish typing @react-navigation/stack |
129,187 | 31.05.2020 13:51:14 | 14,400 | 4e20a73865adb91c78cd5ba30636039b1e41460e | [native] Type all remaining React Nav 5 actions and routers | [
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_vx.x.x.js",
"diff": "@@ -523,7 +523,7 @@ declare module '@react-navigation/bottom-tabs' {\n};\ndeclare type DefaultRouterOptions = {\n- initialRouteName?: string,\n+ +initialRouteName?: string,\n};\ndeclare export type RouterFactory<\n@@ -626,7 +626,46 @@ declare module '@react-navigation/bottom-tabs' {\ndeclare export type TabRouterOptions = {|\n...$Exact<DefaultRouterOptions>,\n- backBehavior?: 'initialRoute' | 'order' | 'history' | 'none',\n+ +backBehavior?: 'initialRoute' | 'order' | 'history' | 'none',\n+ |};\n+\n+ /**\n+ * Drawer actions and router\n+ */\n+\n+ declare type DrawerHistoryEntry =\n+ | {| +type: 'route', +key: string |}\n+ | {| +type: 'drawer' |};\n+ declare export type DrawerNavigationState = {|\n+ ...NavigationState,\n+ +type: 'drawer',\n+ +history: $ReadOnlyArray<DrawerHistoryEntry>,\n+ |};\n+\n+ declare export type OpenDrawerAction = {|\n+ +type: 'OPEN_DRAWER',\n+ +source?: string,\n+ +target?: string,\n+ |};\n+ declare export type CloseDrawerAction = {|\n+ +type: 'CLOSE_DRAWER',\n+ +source?: string,\n+ +target?: string,\n+ |};\n+ declare export type ToggleDrawerAction = {|\n+ +type: 'TOGGLE_DRAWER',\n+ +source?: string,\n+ +target?: string,\n+ |};\n+ declare export type DrawerAction =\n+ | TabAction\n+ | OpenDrawerAction\n+ | CloseDrawerAction\n+ | ToggleDrawerAction;\n+\n+ declare export type DrawerRouterOptions = {|\n+ ...TabRouterOptions,\n+ +openByDefault?: boolean,\n|};\n/**\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/material-bottom-tabs_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/material-bottom-tabs_vx.x.x.js",
"diff": "@@ -523,7 +523,7 @@ declare module '@react-navigation/material-bottom-tabs' {\n};\ndeclare type DefaultRouterOptions = {\n- initialRouteName?: string,\n+ +initialRouteName?: string,\n};\ndeclare export type RouterFactory<\n@@ -626,7 +626,46 @@ declare module '@react-navigation/material-bottom-tabs' {\ndeclare export type TabRouterOptions = {|\n...$Exact<DefaultRouterOptions>,\n- backBehavior?: 'initialRoute' | 'order' | 'history' | 'none',\n+ +backBehavior?: 'initialRoute' | 'order' | 'history' | 'none',\n+ |};\n+\n+ /**\n+ * Drawer actions and router\n+ */\n+\n+ declare type DrawerHistoryEntry =\n+ | {| +type: 'route', +key: string |}\n+ | {| +type: 'drawer' |};\n+ declare export type DrawerNavigationState = {|\n+ ...NavigationState,\n+ +type: 'drawer',\n+ +history: $ReadOnlyArray<DrawerHistoryEntry>,\n+ |};\n+\n+ declare export type OpenDrawerAction = {|\n+ +type: 'OPEN_DRAWER',\n+ +source?: string,\n+ +target?: string,\n+ |};\n+ declare export type CloseDrawerAction = {|\n+ +type: 'CLOSE_DRAWER',\n+ +source?: string,\n+ +target?: string,\n+ |};\n+ declare export type ToggleDrawerAction = {|\n+ +type: 'TOGGLE_DRAWER',\n+ +source?: string,\n+ +target?: string,\n+ |};\n+ declare export type DrawerAction =\n+ | TabAction\n+ | OpenDrawerAction\n+ | CloseDrawerAction\n+ | ToggleDrawerAction;\n+\n+ declare export type DrawerRouterOptions = {|\n+ ...TabRouterOptions,\n+ +openByDefault?: boolean,\n|};\n/**\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_vx.x.x.js",
"diff": "@@ -523,7 +523,7 @@ declare module '@react-navigation/material-top-tabs' {\n};\ndeclare type DefaultRouterOptions = {\n- initialRouteName?: string,\n+ +initialRouteName?: string,\n};\ndeclare export type RouterFactory<\n@@ -626,7 +626,46 @@ declare module '@react-navigation/material-top-tabs' {\ndeclare export type TabRouterOptions = {|\n...$Exact<DefaultRouterOptions>,\n- backBehavior?: 'initialRoute' | 'order' | 'history' | 'none',\n+ +backBehavior?: 'initialRoute' | 'order' | 'history' | 'none',\n+ |};\n+\n+ /**\n+ * Drawer actions and router\n+ */\n+\n+ declare type DrawerHistoryEntry =\n+ | {| +type: 'route', +key: string |}\n+ | {| +type: 'drawer' |};\n+ declare export type DrawerNavigationState = {|\n+ ...NavigationState,\n+ +type: 'drawer',\n+ +history: $ReadOnlyArray<DrawerHistoryEntry>,\n+ |};\n+\n+ declare export type OpenDrawerAction = {|\n+ +type: 'OPEN_DRAWER',\n+ +source?: string,\n+ +target?: string,\n+ |};\n+ declare export type CloseDrawerAction = {|\n+ +type: 'CLOSE_DRAWER',\n+ +source?: string,\n+ +target?: string,\n+ |};\n+ declare export type ToggleDrawerAction = {|\n+ +type: 'TOGGLE_DRAWER',\n+ +source?: string,\n+ +target?: string,\n+ |};\n+ declare export type DrawerAction =\n+ | TabAction\n+ | OpenDrawerAction\n+ | CloseDrawerAction\n+ | ToggleDrawerAction;\n+\n+ declare export type DrawerRouterOptions = {|\n+ ...TabRouterOptions,\n+ +openByDefault?: boolean,\n|};\n/**\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/native_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/native_vx.x.x.js",
"diff": "@@ -523,7 +523,7 @@ declare module '@react-navigation/native' {\n};\ndeclare type DefaultRouterOptions = {\n- initialRouteName?: string,\n+ +initialRouteName?: string,\n};\ndeclare export type RouterFactory<\n@@ -626,7 +626,46 @@ declare module '@react-navigation/native' {\ndeclare export type TabRouterOptions = {|\n...$Exact<DefaultRouterOptions>,\n- backBehavior?: 'initialRoute' | 'order' | 'history' | 'none',\n+ +backBehavior?: 'initialRoute' | 'order' | 'history' | 'none',\n+ |};\n+\n+ /**\n+ * Drawer actions and router\n+ */\n+\n+ declare type DrawerHistoryEntry =\n+ | {| +type: 'route', +key: string |}\n+ | {| +type: 'drawer' |};\n+ declare export type DrawerNavigationState = {|\n+ ...NavigationState,\n+ +type: 'drawer',\n+ +history: $ReadOnlyArray<DrawerHistoryEntry>,\n+ |};\n+\n+ declare export type OpenDrawerAction = {|\n+ +type: 'OPEN_DRAWER',\n+ +source?: string,\n+ +target?: string,\n+ |};\n+ declare export type CloseDrawerAction = {|\n+ +type: 'CLOSE_DRAWER',\n+ +source?: string,\n+ +target?: string,\n+ |};\n+ declare export type ToggleDrawerAction = {|\n+ +type: 'TOGGLE_DRAWER',\n+ +source?: string,\n+ +target?: string,\n+ |};\n+ declare export type DrawerAction =\n+ | TabAction\n+ | OpenDrawerAction\n+ | CloseDrawerAction\n+ | ToggleDrawerAction;\n+\n+ declare export type DrawerRouterOptions = {|\n+ ...TabRouterOptions,\n+ +openByDefault?: boolean,\n|};\n/**\n@@ -1683,7 +1722,27 @@ declare module '@react-navigation/native' {\n+reset: (state: PossiblyStaleNavigationState) => ResetAction,\n+setParams: (params: ScreenParams) => SetParamsAction,\n|};\n+ declare export var StackActions: {|\n+ +replace: (routeName: string, params?: ScreenParams) => ReplaceAction,\n+ +push: (routeName: string, params?: ScreenParams) => PushAction,\n+ +pop: (count?: number) => PopAction,\n+ +popToTop: () => PopToTopAction,\n+ |};\n+ declare export var TabActions: {|\n+ +jumpTo: string => JumpToAction,\n+ |};\n+ declare export var DrawerActions: {|\n+ ...typeof TabActions,\n+ +openDrawer: () => OpenDrawerAction,\n+ +closeDrawer: () => CloseDrawerAction,\n+ +toggleDrawer: () => ToggleDrawerAction,\n+ |};\n+ declare export var BaseRouter: RouterFactory<\n+ NavigationState,\n+ CommonAction,\n+ DefaultRouterOptions,\n+ >;\ndeclare export var StackRouter: RouterFactory<\nStackNavigationState,\nStackAction,\n@@ -1694,6 +1753,11 @@ declare module '@react-navigation/native' {\nTabAction,\nTabRouterOptions,\n>;\n+ declare export var DrawerRouter: RouterFactory<\n+ DrawerNavigationState,\n+ DrawerAction,\n+ DrawerRouterOptions,\n+ >;\ndeclare export var createNavigatorFactory: <\nState: NavigationState,\n@@ -1723,7 +1787,7 @@ declare module '@react-navigation/native' {\noptions: {|\n...$Exact<RouterOptions>,\n...ScreenOptionsProp<ScreenOptions, NavProp>,\n- children?: React$Node,\n+ +children?: React$Node,\n|},\n) => {|\n+state: State,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/stack_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/stack_vx.x.x.js",
"diff": "@@ -523,7 +523,7 @@ declare module '@react-navigation/stack' {\n};\ndeclare type DefaultRouterOptions = {\n- initialRouteName?: string,\n+ +initialRouteName?: string,\n};\ndeclare export type RouterFactory<\n@@ -626,7 +626,46 @@ declare module '@react-navigation/stack' {\ndeclare export type TabRouterOptions = {|\n...$Exact<DefaultRouterOptions>,\n- backBehavior?: 'initialRoute' | 'order' | 'history' | 'none',\n+ +backBehavior?: 'initialRoute' | 'order' | 'history' | 'none',\n+ |};\n+\n+ /**\n+ * Drawer actions and router\n+ */\n+\n+ declare type DrawerHistoryEntry =\n+ | {| +type: 'route', +key: string |}\n+ | {| +type: 'drawer' |};\n+ declare export type DrawerNavigationState = {|\n+ ...NavigationState,\n+ +type: 'drawer',\n+ +history: $ReadOnlyArray<DrawerHistoryEntry>,\n+ |};\n+\n+ declare export type OpenDrawerAction = {|\n+ +type: 'OPEN_DRAWER',\n+ +source?: string,\n+ +target?: string,\n+ |};\n+ declare export type CloseDrawerAction = {|\n+ +type: 'CLOSE_DRAWER',\n+ +source?: string,\n+ +target?: string,\n+ |};\n+ declare export type ToggleDrawerAction = {|\n+ +type: 'TOGGLE_DRAWER',\n+ +source?: string,\n+ +target?: string,\n+ |};\n+ declare export type DrawerAction =\n+ | TabAction\n+ | OpenDrawerAction\n+ | CloseDrawerAction\n+ | ToggleDrawerAction;\n+\n+ declare export type DrawerRouterOptions = {|\n+ ...TabRouterOptions,\n+ +openByDefault?: boolean,\n|};\n/**\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Type all remaining React Nav 5 actions and routers |
129,187 | 31.05.2020 18:27:30 | 14,400 | c7d979985b6b02ba79a4e774cdc174f75fae65a0 | [native] Increase TooltipItem tap target | [
{
"change_type": "MODIFY",
"old_path": "native/navigation/tooltip-item.react.js",
"new_path": "native/navigation/tooltip-item.react.js",
"diff": "@@ -9,7 +9,6 @@ import type {\nimport * as React from 'react';\nimport {\n- View,\nTouchableOpacity,\nStyleSheet,\nText,\n@@ -49,13 +48,14 @@ class TooltipItem<\nrender() {\nreturn (\n- <View style={[styles.itemContainer, this.props.containerStyle]}>\n- <TouchableOpacity onPress={this.onPress}>\n+ <TouchableOpacity\n+ onPress={this.onPress}\n+ style={[styles.itemContainer, this.props.containerStyle]}\n+ >\n<Text style={[styles.label, this.props.labelStyle]} numberOfLines={1}>\n{this.props.spec.text}\n</Text>\n</TouchableOpacity>\n- </View>\n);\n}\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Increase TooltipItem tap target |
129,187 | 31.05.2020 19:17:04 | 14,400 | 84e23d7b1bcb7ad8d9f16a8446b5676632d0c1de | [native] Type useBackButton, useScrollToTop, and theming for | [
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_vx.x.x.js",
"diff": "@@ -1828,6 +1828,10 @@ declare module '@react-navigation/bottom-tabs' {\n// are not present in any other React Navigation libdef.\n//---------------------------------------------------------------------------\n+ /**\n+ * createBottomTabNavigator\n+ */\n+\ndeclare export var createBottomTabNavigator: CreateNavigator<\nTabNavigationState,\nBottomTabOptions,\n@@ -1835,8 +1839,16 @@ declare module '@react-navigation/bottom-tabs' {\nExtraBottomTabNavigatorProps,\n>;\n+ /**\n+ * BottomTabBar\n+ */\n+\ndeclare export var BottomTabBar: React$ComponentType<BottomTabBarProps>;\n+ /**\n+ * BottomTabView\n+ */\n+\ndeclare export type BottomTabViewProps = {|\n...BottomTabNavigationConfig,\n...BottomTabNavigationBuilderResult,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/core_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/core_vx.x.x.js",
"diff": "@@ -1828,6 +1828,10 @@ declare module '@react-navigation/core' {\n// are not present in any other React Navigation libdef.\n//---------------------------------------------------------------------------\n+ /**\n+ * Actions and routers\n+ */\n+\ndeclare export var CommonActions: CommonActionsType;\ndeclare export var StackActions: StackActionsType;\ndeclare export var TabActions: TabActionsType;\n@@ -1854,6 +1858,10 @@ declare module '@react-navigation/core' {\nDrawerRouterOptions,\n>;\n+ /**\n+ * Navigator utils\n+ */\n+\ndeclare export var BaseNavigationContainer: React$AbstractComponent<\nBaseNavigationContainerProps,\nBaseNavigationContainerInterface,\n@@ -1867,6 +1875,10 @@ declare module '@react-navigation/core' {\n?NavigationHelpers<ParamListBase>,\n>;\n+ /**\n+ * Navigation prop / route accessors\n+ */\n+\ndeclare export var NavigationContext: React$Context<\n?NavigationProp<ParamListBase>,\n>;\n@@ -1875,14 +1887,22 @@ declare module '@react-navigation/core' {\ndeclare export var NavigationRouteContext: React$Context<?LeafRoute<>>;\ndeclare export function useRoute(): LeafRoute<>;\n+ declare export function useNavigationState<T>(\n+ selector: NavigationState => T,\n+ ): T;\n+\n+ /**\n+ * Focus utils\n+ */\n+\ndeclare export function useFocusEffect(\neffect: () => ?(() => mixed),\n): void;\ndeclare export function useIsFocused(): boolean;\n- declare export function useNavigationState<T>(\n- selector: NavigationState => T,\n- ): T;\n+ /**\n+ * State utils\n+ */\ndeclare export function getStateFromPath(\npath: string,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/material-bottom-tabs_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/material-bottom-tabs_vx.x.x.js",
"diff": "@@ -1828,6 +1828,10 @@ declare module '@react-navigation/material-bottom-tabs' {\n// are not present in any other React Navigation libdef.\n//---------------------------------------------------------------------------\n+ /**\n+ * createMaterialBottomTabNavigator\n+ */\n+\ndeclare export var createMaterialBottomTabNavigator: CreateNavigator<\nTabNavigationState,\nMaterialBottomTabOptions,\n@@ -1835,6 +1839,10 @@ declare module '@react-navigation/material-bottom-tabs' {\nExtraMaterialBottomTabNavigatorProps,\n>;\n+ /**\n+ * MaterialBottomTabView\n+ */\n+\ndeclare export type MaterialBottomTabDescriptor = Descriptor<\nMaterialBottomTabNavigationProp<>,\nMaterialBottomTabOptions,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_vx.x.x.js",
"diff": "@@ -1828,6 +1828,10 @@ declare module '@react-navigation/material-top-tabs' {\n// are not present in any other React Navigation libdef.\n//---------------------------------------------------------------------------\n+ /**\n+ * createMaterialTopTabNavigator\n+ */\n+\ndeclare export var createMaterialTopTabNavigator: CreateNavigator<\nTabNavigationState,\nMaterialTopTabOptions,\n@@ -1835,6 +1839,10 @@ declare module '@react-navigation/material-top-tabs' {\nExtraMaterialTopTabNavigatorProps,\n>;\n+ /**\n+ * MaterialTopTabView\n+ */\n+\ndeclare export type MaterialTopTabViewProps = {|\n...MaterialTopTabNavigationConfig,\n...MaterialTopTabNavigationBuilderResult,\n@@ -1843,6 +1851,10 @@ declare module '@react-navigation/material-top-tabs' {\nMaterialTopTabViewProps,\n>;\n+ /**\n+ * MaterialTopTabBar\n+ */\n+\ndeclare export var MaterialTopTabBar: React$ComponentType<\nMaterialTopTabBarProps,\n>;\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/native_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/native_vx.x.x.js",
"diff": "@@ -1828,6 +1828,10 @@ declare module '@react-navigation/native' {\n// are not present in any other React Navigation libdef.\n//---------------------------------------------------------------------------\n+ /**\n+ * Actions and routers\n+ */\n+\ndeclare export var CommonActions: CommonActionsType;\ndeclare export var StackActions: StackActionsType;\ndeclare export var TabActions: TabActionsType;\n@@ -1854,6 +1858,10 @@ declare module '@react-navigation/native' {\nDrawerRouterOptions,\n>;\n+ /**\n+ * Navigator utils\n+ */\n+\ndeclare export var BaseNavigationContainer: React$AbstractComponent<\nBaseNavigationContainerProps,\nBaseNavigationContainerInterface,\n@@ -1867,6 +1875,10 @@ declare module '@react-navigation/native' {\n?NavigationHelpers<ParamListBase>,\n>;\n+ /**\n+ * Navigation prop / route accessors\n+ */\n+\ndeclare export var NavigationContext: React$Context<\n?NavigationProp<ParamListBase>,\n>;\n@@ -1875,14 +1887,22 @@ declare module '@react-navigation/native' {\ndeclare export var NavigationRouteContext: React$Context<?LeafRoute<>>;\ndeclare export function useRoute(): LeafRoute<>;\n+ declare export function useNavigationState<T>(\n+ selector: NavigationState => T,\n+ ): T;\n+\n+ /**\n+ * Focus utils\n+ */\n+\ndeclare export function useFocusEffect(\neffect: () => ?(() => mixed),\n): void;\ndeclare export function useIsFocused(): boolean;\n- declare export function useNavigationState<T>(\n- selector: NavigationState => T,\n- ): T;\n+ /**\n+ * State utils\n+ */\ndeclare export function getStateFromPath(\npath: string,\n@@ -1898,6 +1918,33 @@ declare module '@react-navigation/native' {\nstate: PossiblyStaleNavigationState,\n): ?NavigateAction;\n+ /**\n+ * useScrollToTop\n+ */\n+\n+ declare type ScrollToOptions = { y?: number, animated?: boolean, ... };\n+ declare type ScrollToOffsetOptions = {\n+ offset: number,\n+ animated?: boolean,\n+ ...\n+ };\n+ declare type ScrollableView =\n+ | { scrollToTop(): void }\n+ | { scrollTo(options: ScrollToOptions): void }\n+ | { scrollToOffset(options: ScrollToOffsetOptions): void }\n+ | { scrollResponderScrollTo(options: ScrollToOptions): void };\n+ declare type ScrollableWrapper =\n+ | { getScrollResponder(): React$Node }\n+ | { getNode(): ScrollableView }\n+ | ScrollableView;\n+ declare export function useScrollToTop(\n+ ref: { +current: ?ScrollableWrapper, ... },\n+ ): void;\n+\n+ /**\n+ * Themes\n+ */\n+\ndeclare export type Theme = {|\n+dark: boolean,\n+colors: {|\n@@ -1910,6 +1957,15 @@ declare module '@react-navigation/native' {\n|};\ndeclare export var DefaultTheme: Theme & { +dark: false };\ndeclare export var DarkTheme: Theme & { +dark: true };\n+ declare export function useTheme(): Theme;\n+ declare export var ThemeProvider: React$ComponentType<{|\n+ +value: Theme,\n+ +children: React$Node,\n+ |}>;\n+\n+ /**\n+ * Linking\n+ */\ndeclare export type LinkingOptions = {|\n+enabled?: boolean,\n@@ -1919,6 +1975,10 @@ declare module '@react-navigation/native' {\n+getPathFromState?: typeof getPathFromState,\n|};\n+ /**\n+ * NavigationContainer\n+ */\n+\ndeclare export var NavigationContainer: React$AbstractComponent<\n{|\n...BaseNavigationContainerProps,\n@@ -1929,4 +1989,12 @@ declare module '@react-navigation/native' {\nBaseNavigationContainerInterface,\n>;\n+ /**\n+ * useBackButton\n+ */\n+\n+ declare export function useBackButton(\n+ container: { +current: ?React$ElementRef<typeof NavigationContainer>, ... },\n+ ): void;\n+\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/stack_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/stack_vx.x.x.js",
"diff": "@@ -1828,6 +1828,10 @@ declare module '@react-navigation/stack' {\n// are not present in any other React Navigation libdef.\n//---------------------------------------------------------------------------\n+ /**\n+ * StackView\n+ */\n+\ndeclare export var StackView: React$ComponentType<{|\n...StackNavigationProps,\n+state: StackNavigationState,\n@@ -1835,6 +1839,10 @@ declare module '@react-navigation/stack' {\n+descriptors: {| +[key: string]: StackDescriptor |},\n|}>;\n+ /**\n+ * createStackNavigator\n+ */\n+\ndeclare export var createStackNavigator: CreateNavigator<\nStackNavigationState,\nStackOptions,\n@@ -1842,6 +1850,10 @@ declare module '@react-navigation/stack' {\nExtraStackNavigatorProps,\n>;\n+ /**\n+ * Header components\n+ */\n+\ndeclare export var Header: React$ComponentType<StackHeaderProps>;\ndeclare export type StackHeaderTitleProps = $Shape<StackHeaderTitleInputBase>;\n@@ -1864,6 +1876,10 @@ declare module '@react-navigation/stack' {\nHeaderBackgroundProps,\n>;\n+ /**\n+ * Style/animation options\n+ */\n+\ndeclare export var CardStyleInterpolators: {|\n+forHorizontalIOS: StackCardStyleInterpolator,\n+forVerticalIOS: StackCardStyleInterpolator,\n@@ -1899,16 +1915,32 @@ declare module '@react-navigation/stack' {\n+ModalTransition: TransitionPreset,\n|};\n+ /**\n+ * Image assets\n+ */\n+\ndeclare export var Assets: $ReadOnlyArray<ImageURISource>;\n+ /**\n+ * CardAnimation accessors\n+ */\n+\ndeclare export var CardAnimationContext: React$Context<\n?StackCardInterpolationProps,\n>;\ndeclare export function useCardAnimation(): StackCardInterpolationProps\n+ /**\n+ * HeaderHeight accessors\n+ */\n+\ndeclare export var HeaderHeightContext: React$Context<?number>;\ndeclare export function useHeaderHeight(): number;\n+ /**\n+ * GestureHandler accessors\n+ */\n+\ndeclare type GestureHandlerRef = React$ElementRef<\nReact$ComponentType<GestureHandlerProps>,\n>;\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Type useBackButton, useScrollToTop, and theming for @react-navigation/native |
129,187 | 01.06.2020 11:48:24 | 14,400 | 4d24d8cf18b57557a473bc83d66d34ca9810080d | [native] Finish typing
Just the linking stuff | [
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_vx.x.x.js",
"diff": "@@ -427,8 +427,8 @@ declare module '@react-navigation/bottom-tabs' {\ndeclare export type NavigateAction = {|\n+type: 'NAVIGATE',\n+payload:\n- | {| key: string, params?: ScreenParams |}\n- | {| name: string, key?: string, params?: ScreenParams |},\n+ | {| +key: string, +params?: ScreenParams |}\n+ | {| +name: string, +key?: string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\n@@ -440,7 +440,7 @@ declare module '@react-navigation/bottom-tabs' {\n|};\ndeclare export type SetParamsAction = {|\n+type: 'SET_PARAMS',\n- +payload: {| params?: ScreenParams |},\n+ +payload: {| +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\n@@ -588,19 +588,19 @@ declare module '@react-navigation/bottom-tabs' {\ndeclare export type ReplaceAction = {|\n+type: 'REPLACE',\n- +payload: {| name: string, key?: ?string, params?: ScreenParams |},\n+ +payload: {| +name: string, +key?: ?string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\ndeclare export type PushAction = {|\n+type: 'PUSH',\n- +payload: {| name: string, key?: ?string, params?: ScreenParams |},\n+ +payload: {| +name: string, +key?: ?string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\ndeclare export type PopAction = {|\n+type: 'POP',\n- +payload: {| count: number |},\n+ +payload: {| +count: number |},\n+source?: string,\n+target?: string,\n|};\n@@ -637,7 +637,7 @@ declare module '@react-navigation/bottom-tabs' {\ndeclare export type JumpToAction = {|\n+type: 'JUMP_TO',\n- +payload: {| name: string, params?: ScreenParams |},\n+ +payload: {| +name: string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/core_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/core_vx.x.x.js",
"diff": "@@ -427,8 +427,8 @@ declare module '@react-navigation/core' {\ndeclare export type NavigateAction = {|\n+type: 'NAVIGATE',\n+payload:\n- | {| key: string, params?: ScreenParams |}\n- | {| name: string, key?: string, params?: ScreenParams |},\n+ | {| +key: string, +params?: ScreenParams |}\n+ | {| +name: string, +key?: string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\n@@ -440,7 +440,7 @@ declare module '@react-navigation/core' {\n|};\ndeclare export type SetParamsAction = {|\n+type: 'SET_PARAMS',\n- +payload: {| params?: ScreenParams |},\n+ +payload: {| +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\n@@ -588,19 +588,19 @@ declare module '@react-navigation/core' {\ndeclare export type ReplaceAction = {|\n+type: 'REPLACE',\n- +payload: {| name: string, key?: ?string, params?: ScreenParams |},\n+ +payload: {| +name: string, +key?: ?string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\ndeclare export type PushAction = {|\n+type: 'PUSH',\n- +payload: {| name: string, key?: ?string, params?: ScreenParams |},\n+ +payload: {| +name: string, +key?: ?string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\ndeclare export type PopAction = {|\n+type: 'POP',\n- +payload: {| count: number |},\n+ +payload: {| +count: number |},\n+source?: string,\n+target?: string,\n|};\n@@ -637,7 +637,7 @@ declare module '@react-navigation/core' {\ndeclare export type JumpToAction = {|\n+type: 'JUMP_TO',\n- +payload: {| name: string, params?: ScreenParams |},\n+ +payload: {| +name: string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/material-bottom-tabs_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/material-bottom-tabs_vx.x.x.js",
"diff": "@@ -427,8 +427,8 @@ declare module '@react-navigation/material-bottom-tabs' {\ndeclare export type NavigateAction = {|\n+type: 'NAVIGATE',\n+payload:\n- | {| key: string, params?: ScreenParams |}\n- | {| name: string, key?: string, params?: ScreenParams |},\n+ | {| +key: string, +params?: ScreenParams |}\n+ | {| +name: string, +key?: string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\n@@ -440,7 +440,7 @@ declare module '@react-navigation/material-bottom-tabs' {\n|};\ndeclare export type SetParamsAction = {|\n+type: 'SET_PARAMS',\n- +payload: {| params?: ScreenParams |},\n+ +payload: {| +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\n@@ -588,19 +588,19 @@ declare module '@react-navigation/material-bottom-tabs' {\ndeclare export type ReplaceAction = {|\n+type: 'REPLACE',\n- +payload: {| name: string, key?: ?string, params?: ScreenParams |},\n+ +payload: {| +name: string, +key?: ?string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\ndeclare export type PushAction = {|\n+type: 'PUSH',\n- +payload: {| name: string, key?: ?string, params?: ScreenParams |},\n+ +payload: {| +name: string, +key?: ?string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\ndeclare export type PopAction = {|\n+type: 'POP',\n- +payload: {| count: number |},\n+ +payload: {| +count: number |},\n+source?: string,\n+target?: string,\n|};\n@@ -637,7 +637,7 @@ declare module '@react-navigation/material-bottom-tabs' {\ndeclare export type JumpToAction = {|\n+type: 'JUMP_TO',\n- +payload: {| name: string, params?: ScreenParams |},\n+ +payload: {| +name: string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_vx.x.x.js",
"diff": "@@ -427,8 +427,8 @@ declare module '@react-navigation/material-top-tabs' {\ndeclare export type NavigateAction = {|\n+type: 'NAVIGATE',\n+payload:\n- | {| key: string, params?: ScreenParams |}\n- | {| name: string, key?: string, params?: ScreenParams |},\n+ | {| +key: string, +params?: ScreenParams |}\n+ | {| +name: string, +key?: string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\n@@ -440,7 +440,7 @@ declare module '@react-navigation/material-top-tabs' {\n|};\ndeclare export type SetParamsAction = {|\n+type: 'SET_PARAMS',\n- +payload: {| params?: ScreenParams |},\n+ +payload: {| +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\n@@ -588,19 +588,19 @@ declare module '@react-navigation/material-top-tabs' {\ndeclare export type ReplaceAction = {|\n+type: 'REPLACE',\n- +payload: {| name: string, key?: ?string, params?: ScreenParams |},\n+ +payload: {| +name: string, +key?: ?string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\ndeclare export type PushAction = {|\n+type: 'PUSH',\n- +payload: {| name: string, key?: ?string, params?: ScreenParams |},\n+ +payload: {| +name: string, +key?: ?string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\ndeclare export type PopAction = {|\n+type: 'POP',\n- +payload: {| count: number |},\n+ +payload: {| +count: number |},\n+source?: string,\n+target?: string,\n|};\n@@ -637,7 +637,7 @@ declare module '@react-navigation/material-top-tabs' {\ndeclare export type JumpToAction = {|\n+type: 'JUMP_TO',\n- +payload: {| name: string, params?: ScreenParams |},\n+ +payload: {| +name: string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/native_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/native_vx.x.x.js",
"diff": "@@ -427,8 +427,8 @@ declare module '@react-navigation/native' {\ndeclare export type NavigateAction = {|\n+type: 'NAVIGATE',\n+payload:\n- | {| key: string, params?: ScreenParams |}\n- | {| name: string, key?: string, params?: ScreenParams |},\n+ | {| +key: string, +params?: ScreenParams |}\n+ | {| +name: string, +key?: string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\n@@ -440,7 +440,7 @@ declare module '@react-navigation/native' {\n|};\ndeclare export type SetParamsAction = {|\n+type: 'SET_PARAMS',\n- +payload: {| params?: ScreenParams |},\n+ +payload: {| +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\n@@ -588,19 +588,19 @@ declare module '@react-navigation/native' {\ndeclare export type ReplaceAction = {|\n+type: 'REPLACE',\n- +payload: {| name: string, key?: ?string, params?: ScreenParams |},\n+ +payload: {| +name: string, +key?: ?string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\ndeclare export type PushAction = {|\n+type: 'PUSH',\n- +payload: {| name: string, key?: ?string, params?: ScreenParams |},\n+ +payload: {| +name: string, +key?: ?string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\ndeclare export type PopAction = {|\n+type: 'POP',\n- +payload: {| count: number |},\n+ +payload: {| +count: number |},\n+source?: string,\n+target?: string,\n|};\n@@ -637,7 +637,7 @@ declare module '@react-navigation/native' {\ndeclare export type JumpToAction = {|\n+type: 'JUMP_TO',\n- +payload: {| name: string, params?: ScreenParams |},\n+ +payload: {| +name: string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\n@@ -1975,6 +1975,35 @@ declare module '@react-navigation/native' {\n+getPathFromState?: typeof getPathFromState,\n|};\n+ declare export var Link: React$ComponentType<{\n+ +to: string,\n+ +action?: GenericNavigationAction,\n+ +target?: string,\n+ +children: React$Node,\n+ ...\n+ }>;\n+\n+ declare export function useLinking(\n+ container: { +current: ?React$ElementRef<typeof NavigationContainer>, ... },\n+ options: LinkingOptions,\n+ ): {| +getInitialState: () => Promise<?PossiblyStaleNavigationState> |};\n+\n+ declare export function useLinkTo(): (path: string) => void;\n+\n+ declare export function useLinkProps<To: string>(props: {|\n+ +to: Top,\n+ +action?: GenericNavigationAction,\n+ |}): {|\n+ +href: To,\n+ +accessibilityRole: 'link',\n+ +onPress: (MouseEvent | PressEvent) => void,\n+ |};\n+\n+ declare export function useLinkBuilder(): (\n+ name: string,\n+ params?: ScreenParams,\n+ ) => ?string;\n+\n/**\n* NavigationContainer\n*/\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/stack_vx.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/stack_vx.x.x.js",
"diff": "@@ -427,8 +427,8 @@ declare module '@react-navigation/stack' {\ndeclare export type NavigateAction = {|\n+type: 'NAVIGATE',\n+payload:\n- | {| key: string, params?: ScreenParams |}\n- | {| name: string, key?: string, params?: ScreenParams |},\n+ | {| +key: string, +params?: ScreenParams |}\n+ | {| +name: string, +key?: string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\n@@ -440,7 +440,7 @@ declare module '@react-navigation/stack' {\n|};\ndeclare export type SetParamsAction = {|\n+type: 'SET_PARAMS',\n- +payload: {| params?: ScreenParams |},\n+ +payload: {| +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\n@@ -588,19 +588,19 @@ declare module '@react-navigation/stack' {\ndeclare export type ReplaceAction = {|\n+type: 'REPLACE',\n- +payload: {| name: string, key?: ?string, params?: ScreenParams |},\n+ +payload: {| +name: string, +key?: ?string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\ndeclare export type PushAction = {|\n+type: 'PUSH',\n- +payload: {| name: string, key?: ?string, params?: ScreenParams |},\n+ +payload: {| +name: string, +key?: ?string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\ndeclare export type PopAction = {|\n+type: 'POP',\n- +payload: {| count: number |},\n+ +payload: {| +count: number |},\n+source?: string,\n+target?: string,\n|};\n@@ -637,7 +637,7 @@ declare module '@react-navigation/stack' {\ndeclare export type JumpToAction = {|\n+type: 'JUMP_TO',\n- +payload: {| name: string, params?: ScreenParams |},\n+ +payload: {| +name: string, +params?: ScreenParams |},\n+source?: string,\n+target?: string,\n|};\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Finish typing @react-navigation/native
Just the linking stuff |
129,187 | 02.06.2020 11:07:19 | 14,400 | ac90dc63ff6fba4fb233bbcf91011fa9b51daf63 | [web] Open links send in chat in new tab | [
{
"change_type": "MODIFY",
"old_path": "web/chat/text-message.react.js",
"new_path": "web/chat/text-message.react.js",
"diff": "@@ -21,6 +21,16 @@ import css from './chat-message-list.css';\nimport ComposedMessage from './composed-message.react';\nimport textMessageSendFailed from './text-message-send-failed';\n+const linkifyComponentDecorator = (\n+ href: string,\n+ text: React.Node,\n+ key: string,\n+) => (\n+ <a href={href} key={key} target=\"_blank\" rel=\"noopener noreferrer\">\n+ {text}\n+ </a>\n+);\n+\ntype Props = {|\nitem: ChatMessageInfoItem,\nthreadInfo: ThreadInfo,\n@@ -84,7 +94,9 @@ class TextMessage extends React.PureComponent<Props> {\nsetMouseOver={this.props.setMouseOver}\n>\n<div className={messageClassName} style={messageStyle}>\n- <Linkify>{text}</Linkify>\n+ <Linkify componentDecorator={linkifyComponentDecorator}>\n+ {text}\n+ </Linkify>\n</div>\n</ComposedMessage>\n);\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [web] Open links send in chat in new tab |
129,187 | 02.06.2020 16:23:17 | 14,400 | 227375fdca480319e25a3bc8ca82dfa0be7e7642 | [native] codeVersion -> 51 | [
{
"change_type": "MODIFY",
"old_path": "native/android/app/build.gradle",
"new_path": "native/android/app/build.gradle",
"diff": "@@ -132,8 +132,8 @@ android {\napplicationId \"org.squadcal\"\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 50\n- versionName \"0.0.50\"\n+ versionCode 51\n+ versionName \"0.0.51\"\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "native/ios/SquadCal/Info.debug.plist",
"new_path": "native/ios/SquadCal/Info.debug.plist",
"diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>0.0.50</string>\n+ <string>0.0.51</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>50</string>\n+ <string>51</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/ios/SquadCal/Info.release.plist",
"new_path": "native/ios/SquadCal/Info.release.plist",
"diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>0.0.50</string>\n+ <string>0.0.51</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>50</string>\n+ <string>51</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/redux/persist.js",
"new_path": "native/redux/persist.js",
"diff": "@@ -178,7 +178,7 @@ const persistConfig = {\ntimeout: __DEV__ ? 0 : undefined,\n};\n-const codeVersion = 50;\n+const codeVersion = 51;\n// This local exists to avoid a circular dependency where redux-setup needs to\n// import all the navigation and screen stuff, but some of those screens want to\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] codeVersion -> 51 |
129,187 | 03.06.2020 11:47:46 | 14,400 | c8895d19a8cc268dff5549fa7b0c364dc1548f31 | [native] Fix up DisconnectedBar animation
1. Avoid flicker-on-mount by using `react-native`'s `Animated` instead of `react-native-reanimated`
2. Start out the `Animated.Value` at the correct value to avoid unnecessary thrash | [
{
"change_type": "MODIFY",
"old_path": "native/navigation/disconnected-bar.react.js",
"new_path": "native/navigation/disconnected-bar.react.js",
"diff": "// @flow\nimport * as React from 'react';\n-import { Text, StyleSheet, Platform } from 'react-native';\n+import { Text, StyleSheet, Platform, Animated, Easing } from 'react-native';\nimport { useSelector } from 'react-redux';\n-import Animated, { Easing } from 'react-native-reanimated';\n-\n-/* eslint-disable import/no-named-as-default-member */\n-const { Value, timing, interpolate } = Animated;\n-/* eslint-enable import/no-named-as-default-member */\nconst expandedHeight = Platform.select({\nandroid: 29.5,\ndefault: 27,\n});\n+const timingConfig = {\n+ useNativeDriver: true,\n+ duration: 200,\n+ easing: Easing.inOut(Easing.ease),\n+};\ntype Props = {|\nvisible: boolean,\n|};\nfunction DisconnectedBar(props: Props) {\n+ const shouldShowDisconnectedBar = useSelector(\n+ state => state.connection.showDisconnectedBar,\n+ );\n+\nconst showingRef = new React.useRef();\nif (!showingRef.current) {\n- showingRef.current = new Value(0);\n+ showingRef.current = new Animated.Value(shouldShowDisconnectedBar ? 1 : 0);\n}\nconst showing = showingRef.current;\n@@ -31,22 +35,18 @@ function DisconnectedBar(props: Props) {\nshowing.setValue(toValue);\nreturn;\n}\n- timing(showing, {\n+ Animated.timing(showing, {\n+ ...timingConfig,\ntoValue,\n- duration: 200,\n- easing: Easing.inOut(Easing.ease),\n}).start();\n},\n[visible, showing],\n);\n- const shouldShowDisconnectedBar = useSelector(\n- state => state.connection.showDisconnectedBar,\n- );\nconst prevShowDisconnectedBar = React.useRef();\nReact.useEffect(() => {\nconst wasShowing = prevShowDisconnectedBar.current;\n- if (shouldShowDisconnectedBar && !wasShowing) {\n+ if (shouldShowDisconnectedBar && wasShowing === false) {\nchangeShowing(1);\n} else if (!shouldShowDisconnectedBar && wasShowing) {\nchangeShowing(0);\n@@ -54,24 +54,18 @@ function DisconnectedBar(props: Props) {\nprevShowDisconnectedBar.current = shouldShowDisconnectedBar;\n}, [shouldShowDisconnectedBar, changeShowing]);\n- const height = React.useMemo(\n- () =>\n- interpolate(showing, {\n+ const heightStyle = React.useMemo(\n+ () => ({\n+ height: showing.interpolate({\ninputRange: [0, 1],\noutputRange: [0, expandedHeight],\n}),\n- [showing],\n- );\n- const containerStyle = React.useMemo(\n- () => ({\n- height,\n- ...styles.container,\n}),\n- [height],\n+ [showing],\n);\nreturn (\n- <Animated.View style={containerStyle} pointerEvents=\"none\">\n+ <Animated.View style={[styles.container, heightStyle]} pointerEvents=\"none\">\n<Text style={styles.text} numberOfLines={1}>\nDISCONNECTED\n</Text>\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Fix up DisconnectedBar animation
1. Avoid flicker-on-mount by using `react-native`'s `Animated` instead of `react-native-reanimated`
2. Start out the `Animated.Value` at the correct value to avoid unnecessary thrash |
129,187 | 03.06.2020 12:22:38 | 14,400 | 4584909b72cbc2fd6fa09c5409f6e3e89cd8bd09 | [native] Turn off native driver for DisconnectedBar animation | [
{
"change_type": "MODIFY",
"old_path": "native/navigation/disconnected-bar.react.js",
"new_path": "native/navigation/disconnected-bar.react.js",
"diff": "@@ -9,7 +9,7 @@ const expandedHeight = Platform.select({\ndefault: 27,\n});\nconst timingConfig = {\n- useNativeDriver: true,\n+ useNativeDriver: false,\nduration: 200,\neasing: Easing.inOut(Easing.ease),\n};\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Turn off native driver for DisconnectedBar animation |
129,187 | 03.06.2020 12:53:05 | 14,400 | 8613c6021ceb22fa1c27c0b923e8417f5f3fb8b0 | Don't return null from getImageProcessingPlan | [
{
"change_type": "MODIFY",
"old_path": "lib/media/image-utils.js",
"new_path": "lib/media/image-utils.js",
"diff": "@@ -13,13 +13,15 @@ type Input = {|\ninputFileSize: number, // in bytes\ninputOrientation: ?number,\n|};\n-type Plan = {|\n+type ProcessPlan = {|\n+ action: 'process',\ntargetMIME: 'image/png' | 'image/jpeg',\ncompressionRatio: number,\nfitInside: ?Dimensions,\nshouldRotate: boolean,\n|};\n-function getImageProcessingPlan(input: Input): ?Plan {\n+type Plan = {| action: 'none' |} | ProcessPlan;\n+function getImageProcessingPlan(input: Input): Plan {\nconst {\ninputMIME,\ninputDimensions: { width: inputWidth, height: inputHeight },\n@@ -36,7 +38,7 @@ function getImageProcessingPlan(input: Input): ?Plan {\ninputFileSize > 5e5 && (inputWidth > maxWidth || inputHeight > maxHeight);\nif (!unsupportedMIME && !needsRotation && !needsCompression && !needsResize) {\n- return null;\n+ return { action: 'none' };\n}\nconst targetMIME = getTargetMIME(inputMIME);\n@@ -51,6 +53,7 @@ function getImageProcessingPlan(input: Input): ?Plan {\n}\nreturn {\n+ action: 'process',\ntargetMIME,\ncompressionRatio,\nfitInside: needsResize ? maxDimensions : null,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/media/image-utils.js",
"new_path": "native/media/image-utils.js",
"diff": "@@ -40,7 +40,7 @@ async function processImage(\ninputFileSize: fileSize,\ninputOrientation: orientation,\n});\n- if (!plan) {\n+ if (plan.action === 'none') {\nreturn {\nsteps,\nresult: { success: true, uri, dimensions, mime },\n"
},
{
"change_type": "MODIFY",
"old_path": "server/src/uploads/media-utils.js",
"new_path": "server/src/uploads/media-utils.js",
"diff": "@@ -68,7 +68,7 @@ async function validateAndConvert(\ninputFileSize: size,\ninputOrientation: metadata.orientation,\n});\n- if (!plan) {\n+ if (plan.action === 'none') {\nconst name = readableFilename(initialName, mime);\ninvariant(name, `should be able to construct filename for ${mime}`);\nreturn {\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | Don't return null from getImageProcessingPlan |
129,187 | 03.06.2020 12:58:53 | 14,400 | ccdded03382503582908000cbf69b2f1f5e69909 | Move video duration check to getVideoProcessingPlan | [
{
"change_type": "MODIFY",
"old_path": "lib/media/video-utils.js",
"new_path": "lib/media/video-utils.js",
"diff": "// @flow\n-import type { Dimensions } from '../types/media-types';\n+import type { Dimensions, MediaMissionFailure } from '../types/media-types';\nimport invariant from 'invariant';\n@@ -20,11 +20,16 @@ type Input = {|\noutputDirectory: string,\noutputCodec: string,\n|};\n-type Plan = {|\n+type ProcessPlan = {|\n+ action: 'process',\noutputPath: string,\nffmpegCommand: string,\n|};\n-function getVideoProcessingPlan(input: Input): ?Plan {\n+type Plan =\n+ | {| action: 'none' |}\n+ | {| action: 'reject', failure: MediaMissionFailure |}\n+ | ProcessPlan;\n+function getVideoProcessingPlan(input: Input): Plan {\nconst {\ninputPath,\ninputHasCorrectContainerAndCodec,\n@@ -36,8 +41,19 @@ function getVideoProcessingPlan(input: Input): ?Plan {\noutputCodec,\n} = input;\n+ if (inputDuration > videoDurationLimit * 60) {\n+ return {\n+ action: 'reject',\n+ failure: {\n+ success: false,\n+ reason: 'video_too_long',\n+ duration: inputDuration,\n+ },\n+ };\n+ }\n+\nif (inputHasCorrectContainerAndCodec && inputFileSize < 1e7) {\n- return null;\n+ return { action: 'none' };\n}\nconst outputFilename = replaceExtension(\n@@ -79,7 +95,7 @@ function getVideoProcessingPlan(input: Input): ?Plan {\n'-pix_fmt yuv420p ' +\noutputPath;\n- return { outputPath, ffmpegCommand };\n+ return { action: 'process', outputPath, ffmpegCommand };\n}\nfunction getHasMultipleFramesProbeCommand(path: string) {\n"
},
{
"change_type": "MODIFY",
"old_path": "native/media/video-utils.js",
"new_path": "native/media/video-utils.js",
"diff": "@@ -12,10 +12,7 @@ import { Platform } from 'react-native';\nimport invariant from 'invariant';\nimport { mediaConfig, pathFromURI } from 'lib/media/file-utils';\n-import {\n- getVideoProcessingPlan,\n- videoDurationLimit,\n-} from 'lib/media/video-utils';\n+import { getVideoProcessingPlan } from 'lib/media/video-utils';\nimport { getMessageForException } from 'lib/utils/errors';\nimport { ffmpeg } from './ffmpeg';\n@@ -51,12 +48,6 @@ async function processVideo(\nreturn { steps, result: { success: false, reason: 'video_probe_failed' } };\n}\nconst { validFormat, duration } = initialCheckStep;\n- if (duration > videoDurationLimit * 60) {\n- return {\n- steps,\n- result: { success: false, reason: 'video_too_long', duration },\n- };\n- }\nconst plan = getVideoProcessingPlan({\ninputPath: path,\n@@ -78,7 +69,10 @@ async function processVideo(\ndefault: 'h264',\n}),\n});\n- if (!plan) {\n+ if (plan.action === 'reject') {\n+ return { steps, result: plan.failure };\n+ }\n+ if (plan.action === 'none') {\nreturn {\nsteps,\nresult: {\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | Move video duration check to getVideoProcessingPlan |
129,187 | 03.06.2020 16:06:17 | 14,400 | bfcf5c9ffa11fb44ff9535f3790d3fb4805fce32 | Skip video transcode if it's a waste of time
This only happens if the video codec and format is already valid. There's no point transcoding if we're on WiFi and it'll be slower than just uploading. | [
{
"change_type": "MODIFY",
"old_path": "lib/media/video-utils.js",
"new_path": "lib/media/video-utils.js",
"diff": "@@ -10,6 +10,8 @@ import { getUUID } from '../utils/uuid';\nconst { height: maxHeight, width: maxWidth } = maxDimensions;\n+const estimatedResultBitrate = 0.35; // in MiB/s\n+\ntype Input = {|\ninputPath: string,\ninputHasCorrectContainerAndCodec: boolean,\n@@ -19,6 +21,11 @@ type Input = {|\ninputDimensions: Dimensions,\noutputDirectory: string,\noutputCodec: string,\n+ clientConnectionInfo?: {|\n+ hasWiFi: boolean,\n+ speed: number, // in kilobytes per second\n+ |},\n+ clientTranscodeSpeed?: number, // in input video seconds per second\n|};\ntype ProcessPlan = {|\naction: 'process',\n@@ -39,6 +46,8 @@ function getVideoProcessingPlan(input: Input): Plan {\ninputDimensions,\noutputDirectory,\noutputCodec,\n+ clientConnectionInfo,\n+ clientTranscodeSpeed,\n} = input;\nif (inputDuration > videoDurationLimit * 60) {\n@@ -52,9 +61,26 @@ function getVideoProcessingPlan(input: Input): Plan {\n};\n}\n- if (inputHasCorrectContainerAndCodec && inputFileSize < 1e7) {\n+ if (inputHasCorrectContainerAndCodec) {\n+ if (inputFileSize < 1e7) {\n+ return { action: 'none' };\n+ }\n+ if (clientConnectionInfo && clientTranscodeSpeed) {\n+ const rawUploadTime = inputFileSize / 1024 / clientConnectionInfo.speed; // in seconds\n+ const transcodeTime = inputDuration / clientTranscodeSpeed; // in seconds\n+ const estimatedResultFileSize =\n+ inputDuration * estimatedResultBitrate * 1024; // in KiB\n+ const transcodedUploadTime =\n+ estimatedResultFileSize / clientConnectionInfo.speed; // in seconds\n+ const fullProcessTime = transcodeTime + transcodedUploadTime;\n+ if (\n+ (clientConnectionInfo.hasWiFi && rawUploadTime < fullProcessTime) ||\n+ (inputFileSize < 1e8 && rawUploadTime * 2 < fullProcessTime)\n+ ) {\nreturn { action: 'none' };\n}\n+ }\n+ }\nconst outputFilename = replaceExtension(\n`transcode.${getUUID()}.${inputFilename}`,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/input/input-state-container.react.js",
"new_path": "native/input/input-state-container.react.js",
"diff": "@@ -90,6 +90,7 @@ type Props = {|\nnextLocalID: number,\nmessageStoreMessages: { [id: string]: RawMessageInfo },\nongoingMessageCreation: boolean,\n+ hasWiFi: boolean,\n// Redux dispatch functions\ndispatchActionPayload: DispatchActionPayload,\ndispatchActionPromise: DispatchActionPromise,\n@@ -120,6 +121,7 @@ class InputStateContainer extends React.PureComponent<Props, State> {\nnextLocalID: PropTypes.number.isRequired,\nmessageStoreMessages: PropTypes.object.isRequired,\nongoingMessageCreation: PropTypes.bool.isRequired,\n+ hasWiFi: PropTypes.bool.isRequired,\ndispatchActionPayload: PropTypes.func.isRequired,\ndispatchActionPromise: PropTypes.func.isRequired,\nuploadMultimedia: PropTypes.func.isRequired,\n@@ -613,13 +615,14 @@ class InputStateContainer extends React.PureComponent<Props, State> {\n}\nmediaProcessConfig() {\n- const { viewerID } = this.props;\n+ const { hasWiFi, viewerID } = this.props;\nif (__DEV__ || (viewerID && isStaff(viewerID))) {\nreturn {\n+ hasWiFi,\nfinalFileHeaderCheck: true,\n};\n}\n- return {};\n+ return { hasWiFi };\n}\nsetProgress(\n@@ -1042,6 +1045,7 @@ export default connect(\nmediaCreationLoadingStatusSelector(state),\ntextCreationLoadingStatusSelector(state),\n) === 'loading',\n+ hasWiFi: state.connectivity.hasWiFi,\n}),\n{ uploadMultimedia, sendMultimediaMessage, sendTextMessage },\n)(InputStateContainer);\n"
},
{
"change_type": "MODIFY",
"old_path": "native/media/media-utils.js",
"new_path": "native/media/media-utils.js",
"diff": "@@ -18,10 +18,11 @@ import { processVideo } from './video-utils';\nimport { processImage } from './image-utils';\nimport { saveMedia } from './save-media';\n-type MediaProcessConfig = $Shape<{|\n+type MediaProcessConfig = {|\n+ hasWiFi: boolean,\n// Blocks return until we can confirm result has the correct MIME\n- finalFileHeaderCheck: boolean,\n-|}>;\n+ finalFileHeaderCheck?: boolean,\n+|};\ntype MediaResult = {|\nsuccess: true,\nuploadURI: string,\n@@ -155,6 +156,7 @@ async function innerProcessMedia(\nfilename: selection.filename,\nfileSize,\ndimensions,\n+ hasWiFi: config.hasWiFi,\n});\nsteps.push(...videoSteps);\nif (!videoResult.success) {\n"
},
{
"change_type": "MODIFY",
"old_path": "native/media/video-utils.js",
"new_path": "native/media/video-utils.js",
"diff": "@@ -17,12 +17,21 @@ import { getMessageForException } from 'lib/utils/errors';\nimport { ffmpeg } from './ffmpeg';\n+// These are some numbers I sorta kinda made up\n+// We should try to calculate them on a per-device basis\n+const uploadSpeeds = Object.freeze({\n+ wifi: 4096, // in KiB/s\n+ cellular: 512, // in KiB/s\n+});\n+const clientTranscodeSpeed = 1.15; // in seconds of video transcoded per second\n+\ntype ProcessVideoInfo = {|\nuri: string,\nmime: string,\nfilename: string,\nfileSize: number,\ndimensions: Dimensions,\n+ hasWiFi: boolean,\n|};\ntype ProcessVideoResponse = {|\nsuccess: true,\n@@ -68,6 +77,11 @@ async function processVideo(\n//android: 'h264_mediacodec',\ndefault: 'h264',\n}),\n+ clientConnectionInfo: {\n+ hasWiFi: input.hasWiFi,\n+ speed: input.hasWiFi ? uploadSpeeds.wifi : uploadSpeeds.cellular,\n+ },\n+ clientTranscodeSpeed,\n});\nif (plan.action === 'reject') {\nreturn { steps, result: plan.failure };\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | Skip video transcode if it's a waste of time
This only happens if the video codec and format is already valid. There's no point transcoding if we're on WiFi and it'll be slower than just uploading. |
129,187 | 03.06.2020 16:14:02 | 14,400 | 8d10750b774eb563f9bac409b594e94644abb551 | Include hasWiFi in MediaMissionReport | [
{
"change_type": "MODIFY",
"old_path": "lib/types/media-types.js",
"new_path": "lib/types/media-types.js",
"diff": "@@ -394,6 +394,7 @@ export type MediaMissionStep =\noutputURI: ?string,\noutputDimensions: ?Dimensions,\noutputLoop: ?boolean,\n+ hasWiFi?: boolean,\n|}\n| {|\nstep: 'wait_for_capture_uri_unload',\n@@ -748,6 +749,7 @@ export const mediaMissionStepPropType = PropTypes.oneOfType([\noutputURI: PropTypes.string,\noutputDimensions: dimensionsPropType,\noutputLoop: PropTypes.bool,\n+ hasWiFi: PropTypes.bool,\n}),\nPropTypes.shape({\nstep: PropTypes.oneOf(['wait_for_capture_uri_unload']).isRequired,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/input/input-state-container.react.js",
"new_path": "native/input/input-state-container.react.js",
"diff": "@@ -514,6 +514,8 @@ class InputStateContainer extends React.PureComponent<Props, State> {\nconst { uploadURI, shouldDisposePath, filename, mime } = processedMedia;\n+ const { hasWiFi } = this.props;\n+\nconst uploadStart = Date.now();\nlet uploadExceptionMessage, uploadResult, mediaMissionResult;\ntry {\n@@ -568,6 +570,7 @@ class InputStateContainer extends React.PureComponent<Props, State> {\noutputURI: uploadResult && uploadResult.uri,\noutputDimensions: uploadResult && uploadResult.dimensions,\noutputLoop: uploadResult && uploadResult.loop,\n+ hasWiFi,\n});\nconst promises = [];\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | Include hasWiFi in MediaMissionReport |
129,187 | 04.06.2020 18:12:38 | 14,400 | 48ac5bb49e5d6c006213561659b954c8e4230484 | Track ffmpeg progress on native | [
{
"change_type": "MODIFY",
"old_path": "lib/media/video-utils.js",
"new_path": "lib/media/video-utils.js",
"diff": "@@ -119,6 +119,7 @@ function getVideoProcessingPlan(input: Input): Plan {\n`${speed} ` +\n'-movflags +faststart ' +\n'-pix_fmt yuv420p ' +\n+ '-v quiet ' +\noutputPath;\nreturn { action: 'process', outputPath, ffmpegCommand };\n"
},
{
"change_type": "MODIFY",
"old_path": "native/media/ffmpeg.js",
"new_path": "native/media/ffmpeg.js",
"diff": "// @flow\nimport { RNFFmpeg, RNFFprobe, RNFFmpegConfig } from 'react-native-ffmpeg';\n+import invariant from 'invariant';\nimport { getHasMultipleFramesProbeCommand } from 'lib/media/video-utils';\n-if (!__DEV__) {\n- RNFFmpegConfig.disableLogs();\n- RNFFmpegConfig.disableStatistics();\n-}\n-\nconst maxSimultaneousCalls = {\n- process: 4,\n+ process: 1,\nprobe: 1,\n};\n@@ -21,10 +17,30 @@ type QueuedCommand = {|\nrunCommand: () => Promise<void>,\n|};\n+type StatisticsData = {|\n+ // seconds of video being processed per second\n+ +speed: number,\n+ // total milliseconds of video processed so far\n+ +time: number,\n+ // total result file size in bytes so far\n+ +size: number,\n+ +videoQuality: number,\n+ +videoFrameNumber: number,\n+ +videoFps: number,\n+ +bitrate: number,\n+|};\n+\nclass FFmpeg {\nqueue: QueuedCommand[] = [];\ncurrentCalls: CallCounter = { process: 0, probe: 0 };\n+ // The length of the video that's currently being transcoded in seconds\n+ activeCommandInputVideoDuration: ?number;\n+\n+ constructor() {\n+ RNFFmpegConfig.enableStatisticsCallback(this.statisticsCallback);\n+ }\n+\nqueueCommand<R>(\ntype: QueuedCommandType,\nwrappedCommand: () => Promise<R>,\n@@ -78,8 +94,13 @@ class FFmpeg {\ntoRun.forEach(({ runCommand }) => runCommand());\n}\n- process(ffmpegCommand: string) {\n- const wrappedCommand = () => RNFFmpeg.execute(ffmpegCommand);\n+ process(ffmpegCommand: string, inputVideoDuration: number) {\n+ const duration = inputVideoDuration > 0 ? inputVideoDuration : 0.001;\n+ const wrappedCommand = () => {\n+ RNFFmpegConfig.resetStatistics();\n+ this.activeCommandInputVideoDuration = duration;\n+ return RNFFmpeg.execute(ffmpegCommand);\n+ };\nreturn this.queueCommand('process', wrappedCommand);\n}\n@@ -122,6 +143,13 @@ class FFmpeg {\nconst numFrames = parseInt(probeOutput.lastCommandOutput);\nreturn numFrames > 1;\n}\n+\n+ statisticsCallback = (statisticsData: StatisticsData) => {\n+ const { time } = statisticsData;\n+ const videoDuration = this.activeCommandInputVideoDuration;\n+ invariant(videoDuration, 'should be set');\n+ console.log(time / 1000 / videoDuration);\n+ };\n}\nconst ffmpeg = new FFmpeg();\n"
},
{
"change_type": "MODIFY",
"old_path": "native/media/video-utils.js",
"new_path": "native/media/video-utils.js",
"diff": "@@ -106,7 +106,7 @@ async function processVideo(\nexceptionMessage;\nconst start = Date.now();\ntry {\n- const { rc } = await ffmpeg.process(ffmpegCommand);\n+ const { rc } = await ffmpeg.process(ffmpegCommand, duration);\nsuccess = rc === 0;\nif (success) {\nreturnCode = rc;\n@@ -116,7 +116,11 @@ async function processVideo(\nexceptionMessage = getMessageForException(e);\n}\nif (!success) {\n- filesystem.unlink(outputPath);\n+ (async () => {\n+ try {\n+ await filesystem.unlink(outputPath);\n+ } catch {}\n+ })();\n}\nsteps.push({\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | Track ffmpeg progress on native |
129,187 | 05.06.2020 16:54:03 | 14,400 | d581ee131c7161158d39a98a2e25c681884b087a | [native] react-native-splash-screen -> expo-splash-screen | [
{
"change_type": "DELETE",
"old_path": "native/flow-typed/npm/react-native-splash-screen_vx.x.x.js",
"new_path": null,
"diff": "-// flow-typed signature: 38ddb9a38f50873261e20c8d54b63440\n-// flow-typed version: <<STUB>>/react-native-splash-screen_v^3.1.1/flow_v0.98.0\n-\n-/**\n- * This is an autogenerated libdef stub for:\n- *\n- * 'react-native-splash-screen'\n- *\n- * Fill this stub out by replacing all the `any` types.\n- *\n- * Once filled out, we encourage you to share your work with the\n- * community by sending a pull request to:\n- * https://github.com/flowtype/flow-typed\n- */\n-\n-declare module 'react-native-splash-screen' {\n- declare module.exports: any;\n-}\n-\n-/**\n- * We include stubs for each file inside this npm package in case you need to\n- * require those files directly. Feel free to delete any files that aren't\n- * needed.\n- */\n-\n-\n-// Filename aliases\n-declare module 'react-native-splash-screen/index' {\n- declare module.exports: $Exports<'react-native-splash-screen'>;\n-}\n-declare module 'react-native-splash-screen/index.js' {\n- declare module.exports: $Exports<'react-native-splash-screen'>;\n-}\n"
},
{
"change_type": "MODIFY",
"old_path": "native/ios/Podfile.lock",
"new_path": "native/ios/Podfile.lock",
"diff": "@@ -24,6 +24,8 @@ PODS:\n- EXPermissions (8.1.0):\n- UMCore\n- UMPermissionsInterface\n+ - EXSplashScreen (0.2.3):\n+ - UMCore\n- FBLazyVector (0.61.5)\n- FBReactNativeSpec (0.61.5):\n- Folly (= 2018.10.22.00)\n@@ -247,8 +249,6 @@ PODS:\n- React\n- react-native-safe-area-context (3.0.2):\n- React\n- - react-native-splash-screen (3.2.0):\n- - React\n- react-native-video/Video (5.0.2):\n- React\n- react-native-video/VideoCaching (5.0.2):\n@@ -356,6 +356,7 @@ DEPENDENCIES:\n- EXImageManipulator (from `../../node_modules/expo-image-manipulator/ios`)\n- EXMediaLibrary (from `../../node_modules/expo-media-library/ios`)\n- EXPermissions (from `../../node_modules/expo-permissions/ios`)\n+ - EXSplashScreen (from `../../node_modules/expo-splash-screen/ios`)\n- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)\n- FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)\n- Folly (from `../../node_modules/react-native/third-party-podspecs/Folly.podspec`)\n@@ -383,7 +384,6 @@ DEPENDENCIES:\n- react-native-onepassword (from `../../node_modules/react-native-onepassword`)\n- react-native-orientation-locker (from `../../node_modules/react-native-orientation-locker`)\n- react-native-safe-area-context (from `../../node_modules/react-native-safe-area-context`)\n- - react-native-splash-screen (from `../../node_modules/react-native-splash-screen`)\n- react-native-video/VideoCaching (from `../../node_modules/react-native-video/react-native-video.podspec`)\n- React-RCTActionSheet (from `../../node_modules/react-native/Libraries/ActionSheetIOS`)\n- React-RCTAnimation (from `../../node_modules/react-native/Libraries/NativeAnimation`)\n@@ -453,6 +453,8 @@ EXTERNAL SOURCES:\n:path: \"../../node_modules/expo-media-library/ios\"\nEXPermissions:\n:path: \"../../node_modules/expo-permissions/ios\"\n+ EXSplashScreen:\n+ :path: \"../../node_modules/expo-splash-screen/ios\"\nFBLazyVector:\n:path: \"../node_modules/react-native/Libraries/FBLazyVector\"\nFBReactNativeSpec:\n@@ -503,8 +505,6 @@ EXTERNAL SOURCES:\n:path: \"../../node_modules/react-native-orientation-locker\"\nreact-native-safe-area-context:\n:path: \"../../node_modules/react-native-safe-area-context\"\n- react-native-splash-screen:\n- :path: \"../../node_modules/react-native-splash-screen\"\nreact-native-video:\n:podspec: \"../../node_modules/react-native-video/react-native-video.podspec\"\nReact-RCTActionSheet:\n@@ -600,6 +600,7 @@ SPEC CHECKSUMS:\nEXImageManipulator: 97f61d14c292714d66884e83697e794f8cefe0b0\nEXMediaLibrary: 02a13521d05ca381b08f7d745a9602569eade072\nEXPermissions: 24b97f734ce9172d245a5be38ad9ccfcb6135964\n+ EXSplashScreen: 6568daa178c8e17f2197d29cea858f0e0b61b695\nFBLazyVector: aaeaf388755e4f29cd74acbc9e3b8da6d807c37f\nFBReactNativeSpec: 118d0d177724c2d67f08a59136eb29ef5943ec75\nFolly: 30e7936e1c45c08d884aa59369ed951a8e68cf51\n@@ -627,7 +628,6 @@ SPEC CHECKSUMS:\nreact-native-onepassword: 5b2b7f425f9db40932703e65d350b78cbc598047\nreact-native-orientation-locker: 23918c400376a7043e752c639c122fcf6bce8f1c\nreact-native-safe-area-context: b11a34881faac509cad5578726c98161ad4d275c\n- react-native-splash-screen: 200d11d188e2e78cea3ad319964f6142b6384865\nreact-native-video: d01ed7ff1e38fa7dcc6c15c94cf505e661b7bfd0\nReact-RCTActionSheet: 600b4d10e3aea0913b5a92256d2719c0cdd26d76\nReact-RCTAnimation: 791a87558389c80908ed06cc5dfc5e7920dfa360\n"
},
{
"change_type": "MODIFY",
"old_path": "native/navigation/app-navigator.react.js",
"new_path": "native/navigation/app-navigator.react.js",
"diff": "@@ -7,10 +7,11 @@ import type { BottomTabNavigationProp } from '@react-navigation/bottom-tabs';\nimport * as React from 'react';\nimport { createBottomTabNavigator } from '@react-navigation/bottom-tabs';\nimport { PersistGate } from 'redux-persist/integration/react';\n-import SplashScreen from 'react-native-splash-screen';\n-import { Platform } from 'react-native';\n+import * as SplashScreen from 'expo-splash-screen';\nimport Icon from 'react-native-vector-icons/FontAwesome';\n+SplashScreen.preventAutoHideAsync();\n+\nimport {\nCalendarRouteName,\nChatRouteName,\n@@ -125,11 +126,10 @@ function AppNavigator(props: AppNavigatorProps) {\n}, [setNavStateInitialized]);\nReact.useEffect(() => {\n- if (Platform.OS === 'android') {\n- waitForInteractions().then(() => SplashScreen.hide());\n- } else {\n- SplashScreen.hide();\n- }\n+ (async () => {\n+ await waitForInteractions();\n+ await SplashScreen.hideAsync();\n+ })();\n}, []);\nreturn (\n"
},
{
"change_type": "MODIFY",
"old_path": "native/package.json",
"new_path": "native/package.json",
"diff": "\"base-64\": \"^0.1.0\",\n\"expo-image-manipulator\": \"^8.1.0\",\n\"expo-media-library\": \"^8.1.0\",\n+ \"expo-splash-screen\": \"^0.2.3\",\n\"find-root\": \"^1.1.0\",\n\"hoist-non-react-statics\": \"^3.1.0\",\n\"invariant\": \"^2.2.4\",\n\"react-native-reanimated\": \"^1.9.0\",\n\"react-native-safe-area-context\": \"^3.0.2\",\n\"react-native-screens\": \"^2.7.0\",\n- \"react-native-splash-screen\": \"^3.2.0\",\n\"react-native-unimodules\": \"^0.9.0\",\n\"react-native-vector-icons\": \"^6.6.0\",\n\"react-native-video\": \"^5.0.2\",\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "dependencies:\n\"@types/hammerjs\" \"^2.0.36\"\n+\"@expo/configure-splash-screen@~0.1.0\":\n+ version \"0.1.10\"\n+ resolved \"https://registry.yarnpkg.com/@expo/configure-splash-screen/-/configure-splash-screen-0.1.10.tgz#93c2a7a64a3ee769280bd4592d7247756e81c4d5\"\n+ integrity sha512-zBgm+bCtN7ZifG5sBv2Y35o0mgrJzOQ3sJLt+tMsuDAzwAyTi+5xj301UMTh0tFpJTrtQbqxZMQk+v2Eizuyvw==\n+ dependencies:\n+ \"@react-native-community/cli-platform-android\" \"4.7.0\"\n+ \"@react-native-community/cli-platform-ios\" \"4.7.0\"\n+ color-string \"^1.5.3\"\n+ commander \"^5.1.0\"\n+ core-js \"^3.6.5\"\n+ fs-extra \"9.0.0\"\n+ pngjs \"^5.0.0\"\n+ xcode \"^3.0.0\"\n+ xml-js \"^1.6.11\"\n+\n\"@firebase/app-types@0.4.4\":\nversion \"0.4.4\"\nresolved \"https://registry.yarnpkg.com/@firebase/app-types/-/app-types-0.4.4.tgz#6423e9b284018109d3658a6ecf7f82ca0e288bbb\"\ndependencies:\nserve-static \"^1.13.1\"\n+\"@react-native-community/cli-platform-android@4.7.0\":\n+ version \"4.7.0\"\n+ resolved \"https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-4.7.0.tgz#aace6b8004b8d3aae40d6affaad1c472e0310a25\"\n+ integrity sha512-Lb6D0ipmFwYLJeQy5/NI4uJpeSHw85rd84C40wwpoUfsCgZhA93WUJdFkuQEIDkfTqs5Yqgl+/szhIZdnIXPxw==\n+ dependencies:\n+ \"@react-native-community/cli-tools\" \"^4.7.0\"\n+ chalk \"^3.0.0\"\n+ execa \"^1.0.0\"\n+ fs-extra \"^8.1.0\"\n+ glob \"^7.1.3\"\n+ jetifier \"^1.6.2\"\n+ lodash \"^4.17.15\"\n+ logkitty \"^0.6.0\"\n+ slash \"^3.0.0\"\n+ xmldoc \"^1.1.2\"\n+\n\"@react-native-community/cli-platform-android@^3.0.0\":\nversion \"3.1.4\"\nresolved \"https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-3.1.4.tgz#61f964dc311623e60b0fb29c5f3732cc8a6f076f\"\nslash \"^3.0.0\"\nxmldoc \"^1.1.2\"\n+\"@react-native-community/cli-platform-ios@4.7.0\":\n+ version \"4.7.0\"\n+ resolved \"https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-4.7.0.tgz#471dcdbd2645c5650f16c0eddcca50e47ca78398\"\n+ integrity sha512-XqnxP6H6+PG/wn4+Pwas5jaTSr5n7x6v8trkPY8iO37b8sq7tJLNYznaBMROF43i0NqO48JdhquYOqnDN8FdBA==\n+ dependencies:\n+ \"@react-native-community/cli-tools\" \"^4.7.0\"\n+ chalk \"^3.0.0\"\n+ glob \"^7.1.3\"\n+ js-yaml \"^3.13.1\"\n+ lodash \"^4.17.15\"\n+ plist \"^3.0.1\"\n+ xcode \"^2.0.0\"\n+\n\"@react-native-community/cli-platform-ios@^3.0.0\":\nversion \"3.2.0\"\nresolved \"https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-3.2.0.tgz#c469444f5993c9e6737a4b16d78cf033e3702f00\"\nmime \"^2.4.1\"\nnode-fetch \"^2.5.0\"\n+\"@react-native-community/cli-tools@^4.7.0\":\n+ version \"4.9.0\"\n+ resolved \"https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-4.9.0.tgz#d8fd0326cc2fcaeb8c920baf24b68b63c8164fa2\"\n+ integrity sha512-vCeYkJ3n/EIaW3lAfznzojMffGxYhCUzwZzwBuC3+O+gYxkymdpletqNYLLEa04DzJr174mxgbgBw8g5IP91yA==\n+ dependencies:\n+ chalk \"^3.0.0\"\n+ lodash \"^4.17.15\"\n+ mime \"^2.4.1\"\n+ node-fetch \"^2.6.0\"\n+ open \"^6.2.0\"\n+ shell-quote \"1.6.1\"\n+\n\"@react-native-community/cli-types@^3.0.0\":\nversion \"3.0.0\"\nresolved \"https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-3.0.0.tgz#488d46605cb05e88537e030f38da236eeda74652\"\n@@ -3134,6 +3190,11 @@ asynckit@^0.4.0:\nresolved \"https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79\"\nintegrity sha1-x57Zf380y48robyXkLzDZkdLS3k=\n+at-least-node@^1.0.0:\n+ version \"1.0.0\"\n+ resolved \"https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2\"\n+ integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==\n+\natob@^2.1.1:\nversion \"2.1.2\"\nresolved \"https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9\"\n@@ -3322,6 +3383,11 @@ big-integer@^1.6.17, big-integer@^1.6.7:\nresolved \"https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.46.tgz#e18a75f0515be0f3ad10c0d110e37fa882b3f223\"\nintegrity sha512-Vj2TNtZ8Y0XaL6HCkzJiEqfykjtv/9wVCWIutMe+QVIXLPe2tCLEzULtYvcX9WRtmNIj3Jqi5tNjIsR0N4QOsg==\n+big-integer@^1.6.44:\n+ version \"1.6.48\"\n+ resolved \"https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.48.tgz#8fd88bd1632cba4a1c8c3e3d7159f08bb95b4b9e\"\n+ integrity sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==\n+\nbig.js@^5.2.2:\nversion \"5.2.2\"\nresolved \"https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328\"\n@@ -3435,6 +3501,13 @@ bplist-creator@0.0.7:\ndependencies:\nstream-buffers \"~2.2.0\"\n+bplist-creator@0.0.8:\n+ version \"0.0.8\"\n+ resolved \"https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.0.8.tgz#56b2a6e79e9aec3fc33bf831d09347d73794e79c\"\n+ integrity sha512-Za9JKzD6fjLC16oX2wsXfc+qBEhJBJB1YPInoAQpMLhDuj5aVOv1baGeIQSq1Fr3OCqzvsoQcSBSwGId/Ja2PA==\n+ dependencies:\n+ stream-buffers \"~2.2.0\"\n+\nbplist-parser@0.1.1:\nversion \"0.1.1\"\nresolved \"https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.1.1.tgz#d60d5dcc20cba6dc7e1f299b35d3e1f95dafbae6\"\n@@ -3442,6 +3515,13 @@ bplist-parser@0.1.1:\ndependencies:\nbig-integer \"^1.6.7\"\n+bplist-parser@0.2.0:\n+ version \"0.2.0\"\n+ resolved \"https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.2.0.tgz#43a9d183e5bf9d545200ceac3e712f79ebbe8d0e\"\n+ integrity sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==\n+ dependencies:\n+ big-integer \"^1.6.44\"\n+\nbrace-expansion@^1.1.7:\nversion \"1.1.11\"\nresolved \"https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd\"\n@@ -4121,7 +4201,7 @@ color-name@^1.0.0, color-name@~1.1.4:\nresolved \"https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2\"\nintegrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==\n-color-string@^1.5.2:\n+color-string@^1.5.2, color-string@^1.5.3:\nversion \"1.5.3\"\nresolved \"https://registry.yarnpkg.com/color-string/-/color-string-1.5.3.tgz#c9bbc5f01b58b5492f3d6857459cb6590ce204cc\"\nintegrity sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==\n@@ -4174,6 +4254,11 @@ commander@^4.0.1:\nresolved \"https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068\"\nintegrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==\n+commander@^5.1.0:\n+ version \"5.1.0\"\n+ resolved \"https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae\"\n+ integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==\n+\ncommander@~2.13.0:\nversion \"2.13.0\"\nresolved \"https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c\"\n@@ -4414,6 +4499,11 @@ core-js@^3.2.1:\nresolved \"https://registry.yarnpkg.com/core-js/-/core-js-3.2.1.tgz#cd41f38534da6cc59f7db050fe67307de9868b09\"\nintegrity sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==\n+core-js@^3.6.5:\n+ version \"3.6.5\"\n+ resolved \"https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a\"\n+ integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==\n+\ncore-util-is@1.0.2, core-util-is@~1.0.0:\nversion \"1.0.2\"\nresolved \"https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7\"\n@@ -5814,6 +5904,13 @@ expo-permissions@~8.1.0:\nresolved \"https://registry.yarnpkg.com/expo-permissions/-/expo-permissions-8.1.0.tgz#a7f2ee91ba76ce3a467e7b10adaa9ca5201b226f\"\nintegrity sha512-QBHD+1J9+sGFnhoEGzMRchPweeEE0OJ9ehG/0l1BMRBA7qsLS9vRC1FTJ55NwjI0Kr4RTha9r6ZX1kZHT09f/w==\n+expo-splash-screen@^0.2.3:\n+ version \"0.2.3\"\n+ resolved \"https://registry.yarnpkg.com/expo-splash-screen/-/expo-splash-screen-0.2.3.tgz#3f913652596de128828499db3a6a9da1cb201d61\"\n+ integrity sha512-gKSD+RqShvCopHJssw32ugKJcAT9zHGi6ZkhG3N+VvJSHisZcMFFMcQAzMPdt6IntGjOnib/f79NVCsl6pXyTA==\n+ dependencies:\n+ \"@expo/configure-splash-screen\" \"~0.1.0\"\n+\nexpress-ws@^4.0.0:\nversion \"4.0.0\"\nresolved \"https://registry.yarnpkg.com/express-ws/-/express-ws-4.0.0.tgz#dabd8dc974516418902a41fe6e30ed949b4d36c4\"\n@@ -6338,6 +6435,16 @@ fs-constants@^1.0.0:\nresolved \"https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad\"\nintegrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==\n+fs-extra@9.0.0:\n+ version \"9.0.0\"\n+ resolved \"https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.0.tgz#b6afc31036e247b2466dc99c29ae797d5d4580a3\"\n+ integrity sha512-pmEYSk3vYsG/bF651KPUXZ+hvjpgWYw/Gc7W9NFUe3ZVLczKKWIij3IKpOrQcdw4TILtibFslZ0UmR8Vvzig4g==\n+ dependencies:\n+ at-least-node \"^1.0.0\"\n+ graceful-fs \"^4.2.0\"\n+ jsonfile \"^6.0.1\"\n+ universalify \"^1.0.0\"\n+\nfs-extra@^1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950\"\n@@ -8441,6 +8548,15 @@ jsonfile@^4.0.0:\noptionalDependencies:\ngraceful-fs \"^4.1.6\"\n+jsonfile@^6.0.1:\n+ version \"6.0.1\"\n+ resolved \"https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179\"\n+ integrity sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg==\n+ dependencies:\n+ universalify \"^1.0.0\"\n+ optionalDependencies:\n+ graceful-fs \"^4.1.6\"\n+\njsonify@~0.0.0:\nversion \"0.0.0\"\nresolved \"https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73\"\n@@ -10835,6 +10951,11 @@ pn@^1.1.0:\nresolved \"https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb\"\nintegrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==\n+pngjs@^5.0.0:\n+ version \"5.0.0\"\n+ resolved \"https://registry.yarnpkg.com/pngjs/-/pngjs-5.0.0.tgz#e79dd2b215767fd9c04561c01236df960bce7fbb\"\n+ integrity sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==\n+\nportfinder@^1.0.25:\nversion \"1.0.25\"\nresolved \"https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca\"\n@@ -11774,11 +11895,6 @@ react-native-screens@^2.7.0:\nresolved \"https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.7.0.tgz#2d3cf3c39a665e9ca1c774264fccdb90e7944047\"\nintegrity sha512-n/23IBOkrTKCfuUd6tFeRkn3lB2QZ3cmvoubRscR0JU/Zl4/ZyKmwnFmUv1/Fr+2GH/H8UTX59kEKDYYg3dMgA==\n-react-native-splash-screen@^3.2.0:\n- version \"3.2.0\"\n- resolved \"https://registry.yarnpkg.com/react-native-splash-screen/-/react-native-splash-screen-3.2.0.tgz#d47ec8557b1ba988ee3ea98d01463081b60fff45\"\n- integrity sha512-Ls9qiNZzW/OLFoI25wfjjAcrf2DZ975hn2vr6U9gyuxi2nooVbzQeFoQS5vQcbCt9QX5NY8ASEEAtlLdIa6KVg==\n-\nreact-native-unimodules@^0.9.0:\nversion \"0.9.0\"\nresolved \"https://registry.yarnpkg.com/react-native-unimodules/-/react-native-unimodules-0.9.0.tgz#5ce642ac50d124b9d41c09ff7cb397e22f1110ea\"\n@@ -12873,6 +12989,15 @@ simple-plist@^1.0.0:\nbplist-parser \"0.1.1\"\nplist \"^3.0.1\"\n+simple-plist@^1.1.0:\n+ version \"1.1.0\"\n+ resolved \"https://registry.yarnpkg.com/simple-plist/-/simple-plist-1.1.0.tgz#8354ab63eb3922a054c78ce96c209c532e907a23\"\n+ integrity sha512-2i5Tc0BYAqppM7jVzmNrI+aEUntPolIq4fDgji6WuNNn1D/qYdn2KwoLhZdzQkE04lu9L5tUoeJsjuJAvd+lFg==\n+ dependencies:\n+ bplist-creator \"0.0.8\"\n+ bplist-parser \"0.2.0\"\n+ plist \"^3.0.1\"\n+\nsimple-swizzle@^0.2.2:\nversion \"0.2.2\"\nresolved \"https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a\"\n@@ -14140,6 +14265,11 @@ universalify@^0.1.0:\nresolved \"https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66\"\nintegrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==\n+universalify@^1.0.0:\n+ version \"1.0.0\"\n+ resolved \"https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d\"\n+ integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==\n+\nunpipe@1.0.0, unpipe@~1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec\"\n@@ -14344,6 +14474,11 @@ uuid@^3.4.0:\nresolved \"https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee\"\nintegrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==\n+uuid@^7.0.3:\n+ version \"7.0.3\"\n+ resolved \"https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b\"\n+ integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==\n+\nv8-compile-cache@2.0.3:\nversion \"2.0.3\"\nresolved \"https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe\"\n@@ -14800,6 +14935,14 @@ xcode@^2.0.0:\nsimple-plist \"^1.0.0\"\nuuid \"^3.3.2\"\n+xcode@^3.0.0:\n+ version \"3.0.1\"\n+ resolved \"https://registry.yarnpkg.com/xcode/-/xcode-3.0.1.tgz#3efb62aac641ab2c702458f9a0302696146aa53c\"\n+ integrity sha512-kCz5k7J7XbJtjABOvkc5lJmkiDh8VhjVCGNiqdKCscmVpdVUpEAyXv1xmCLkQJ5dsHqx3IPO4XW+NTDhU/fatA==\n+ dependencies:\n+ simple-plist \"^1.1.0\"\n+ uuid \"^7.0.3\"\n+\nxdg-basedir@^3.0.0:\nversion \"3.0.0\"\nresolved \"https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4\"\n@@ -14810,6 +14953,13 @@ xdg-basedir@^4.0.0:\nresolved \"https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13\"\nintegrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==\n+xml-js@^1.6.11:\n+ version \"1.6.11\"\n+ resolved \"https://registry.yarnpkg.com/xml-js/-/xml-js-1.6.11.tgz#927d2f6947f7f1c19a316dd8eea3614e8b18f8e9\"\n+ integrity sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==\n+ dependencies:\n+ sax \"^1.2.4\"\n+\nxml-name-validator@^3.0.0:\nversion \"3.0.0\"\nresolved \"https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a\"\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] react-native-splash-screen -> expo-splash-screen |
129,187 | 05.06.2020 17:02:37 | 14,400 | e4d0c1e6208a69a82a2f35836825bd0a6cc82ac6 | [native] Configure expo-splash-screen for iOS
We're using a storyboard now, as xibs are able to be deprecated | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "native/ios/SplashScreen.storyboard",
"diff": "+<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"16097\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">\n+ <device id=\"retina6_1\" orientation=\"portrait\" appearance=\"light\"/>\n+ <dependencies>\n+ <deployment identifier=\"iOS\"/>\n+ <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"16087\"/>\n+ <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n+ <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n+ </dependencies>\n+ <scenes>\n+ <!--View Controller-->\n+ <scene sceneID=\"EHf-IW-A2E\">\n+ <objects>\n+ <viewController storyboardIdentifier=\"SplashScreenViewController\" automaticallyAdjustsScrollViewInsets=\"NO\" id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n+ <view key=\"view\" contentMode=\"scaleToFill\" insetsLayoutMarginsFromSafeArea=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"nvi-kw-ZOr\">\n+ <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"896\"/>\n+ <subviews>\n+ <imageView clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFill\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" insetsLayoutMarginsFromSafeArea=\"NO\" image=\"SplashBackground\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"XDd-ht-ntp\">\n+ <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"896\"/>\n+ <color key=\"backgroundColor\" red=\"1\" green=\"0.0\" blue=\"0.092869963400000005\" alpha=\"0.0\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n+ <color key=\"tintColor\" red=\"1\" green=\"0.0\" blue=\"0.092869963400000005\" alpha=\"0.0\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n+ </imageView>\n+ <imageView clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFit\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" image=\"Header\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"v97-50-knt\">\n+ <rect key=\"frame\" x=\"118.5\" y=\"397\" width=\"177\" height=\"62\"/>\n+ <color key=\"tintColor\" red=\"1\" green=\"0.0\" blue=\"0.092869963400000005\" alpha=\"0.0\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n+ </imageView>\n+ </subviews>\n+ <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\" cocoaTouchSystemColor=\"whiteColor\"/>\n+ <constraints>\n+ <constraint firstItem=\"XDd-ht-ntp\" firstAttribute=\"top\" secondItem=\"nvi-kw-ZOr\" secondAttribute=\"top\" id=\"Bbo-3e-cbK\"/>\n+ <constraint firstAttribute=\"bottom\" secondItem=\"XDd-ht-ntp\" secondAttribute=\"bottom\" id=\"HZJ-YU-cSh\"/>\n+ <constraint firstItem=\"v97-50-knt\" firstAttribute=\"centerX\" secondItem=\"nvi-kw-ZOr\" secondAttribute=\"centerX\" id=\"Jdl-tM-S74\"/>\n+ <constraint firstAttribute=\"trailing\" secondItem=\"XDd-ht-ntp\" secondAttribute=\"trailing\" id=\"YBi-9m-s01\"/>\n+ <constraint firstItem=\"XDd-ht-ntp\" firstAttribute=\"leading\" secondItem=\"nvi-kw-ZOr\" secondAttribute=\"leading\" id=\"ZTe-QG-Nli\"/>\n+ <constraint firstItem=\"XDd-ht-ntp\" firstAttribute=\"centerX\" secondItem=\"nvi-kw-ZOr\" secondAttribute=\"centerX\" id=\"fVU-PV-N6U\"/>\n+ <constraint firstItem=\"XDd-ht-ntp\" firstAttribute=\"centerY\" secondItem=\"nvi-kw-ZOr\" secondAttribute=\"centerY\" id=\"tbV-Um-ZE2\"/>\n+ <constraint firstItem=\"v97-50-knt\" firstAttribute=\"centerY\" secondItem=\"nvi-kw-ZOr\" secondAttribute=\"centerY\" constant=\"-20\" id=\"y4g-id-F9J\"/>\n+ </constraints>\n+ <viewLayoutGuide key=\"safeArea\" id=\"LGf-cj-VRq\"/>\n+ </view>\n+ </viewController>\n+ <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n+ </objects>\n+ <point key=\"canvasLocation\" x=\"52.173913043478265\" y=\"375\"/>\n+ </scene>\n+ </scenes>\n+ <color key=\"tintColor\" red=\"1\" green=\"0.0\" blue=\"0.092869963400000005\" alpha=\"0.0\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n+ <resources>\n+ <image name=\"Header\" width=\"177\" height=\"62\"/>\n+ <image name=\"SplashBackground\" width=\"414\" height=\"812\"/>\n+ </resources>\n+</document>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/ios/SquadCal.xcodeproj/project.pbxproj",
"new_path": "native/ios/SquadCal.xcodeproj/project.pbxproj",
"diff": "/* Begin PBXBuildFile section */\n13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };\n- 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };\n13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };\n13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };\n1A53F0D47E0E927C69B86A06 /* libPods-SquadCal.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D1B223F3AE00077DC21172C7 /* libPods-SquadCal.a */; };\n7F26E81C24440D87004049C6 /* dummy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F26E81B24440D87004049C6 /* dummy.swift */; };\n7F761E602201141E001B6FB7 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F761E292201141E001B6FB7 /* JavaScriptCore.framework */; };\n+ 7F788C2C248AA2140098F071 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7F788C2B248AA2130098F071 /* SplashScreen.storyboard */; };\n7FB58ABE1E7F6BD500B4C1B1 /* Anaheim-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7FB58ABB1E7F6BC600B4C1B1 /* Anaheim-Regular.ttf */; };\n7FB58AC01E7F6BD800B4C1B1 /* OpenSans-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7FB58ABC1E7F6BC600B4C1B1 /* OpenSans-Regular.ttf */; };\n7FB58AC21E7F6BDB00B4C1B1 /* OpenSans-Semibold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7FB58ABD1E7F6BC600B4C1B1 /* OpenSans-Semibold.ttf */; };\n13B07F961A680F5B00A75B9A /* SquadCal.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SquadCal.app; sourceTree = BUILT_PRODUCTS_DIR; };\n13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = SquadCal/AppDelegate.h; sourceTree = \"<group>\"; };\n13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = SquadCal/AppDelegate.m; sourceTree = \"<group>\"; };\n- 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = \"<group>\"; };\n13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = SquadCal/Images.xcassets; sourceTree = \"<group>\"; };\n13B07FB61A68108700A75B9A /* Info.release.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.release.plist; path = SquadCal/Info.release.plist; sourceTree = \"<group>\"; };\n13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = SquadCal/main.m; sourceTree = \"<group>\"; };\n7F26E81B24440D87004049C6 /* dummy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = dummy.swift; sourceTree = \"<group>\"; };\n7F554F822332D58B007CB9F7 /* Info.debug.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.debug.plist; path = SquadCal/Info.debug.plist; sourceTree = \"<group>\"; };\n7F761E292201141E001B6FB7 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };\n+ 7F788C2B248AA2130098F071 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = SplashScreen.storyboard; sourceTree = \"<group>\"; };\n7FB58ABB1E7F6BC600B4C1B1 /* Anaheim-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = \"Anaheim-Regular.ttf\"; sourceTree = \"<group>\"; };\n7FB58ABC1E7F6BC600B4C1B1 /* OpenSans-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = \"OpenSans-Regular.ttf\"; sourceTree = \"<group>\"; };\n7FB58ABD1E7F6BC600B4C1B1 /* OpenSans-Semibold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = \"OpenSans-Semibold.ttf\"; sourceTree = \"<group>\"; };\n13B07FAE1A68108700A75B9A /* SquadCal */ = {\nisa = PBXGroup;\nchildren = (\n+ 7F788C2B248AA2130098F071 /* SplashScreen.storyboard */,\n7FCFD8BD1E81B8DF00629B0E /* SquadCal.entitlements */,\n008F07F21AC5B25A0029DE68 /* main.jsbundle */,\n13B07FAF1A68108700A75B9A /* AppDelegate.h */,\n13B07FB51A68108700A75B9A /* Images.xcassets */,\n7F554F822332D58B007CB9F7 /* Info.debug.plist */,\n13B07FB61A68108700A75B9A /* Info.release.plist */,\n- 13B07FB11A68108700A75B9A /* LaunchScreen.xib */,\n13B07FB71A68108700A75B9A /* main.m */,\n7FCEA2DC2444010B004017B1 /* SquadCal-Bridging-Header.h */,\n7F26E81B24440D87004049C6 /* dummy.swift */,\nfiles = (\n7FB58ABE1E7F6BD500B4C1B1 /* Anaheim-Regular.ttf in Resources */,\n13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,\n- 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,\n7FB58AC21E7F6BDB00B4C1B1 /* OpenSans-Semibold.ttf in Resources */,\n+ 7F788C2C248AA2140098F071 /* SplashScreen.storyboard in Resources */,\n7FB58AC01E7F6BD800B4C1B1 /* OpenSans-Regular.ttf in Resources */,\n);\nrunOnlyForDeploymentPostprocessing = 0;\n};\n/* End PBXSourcesBuildPhase section */\n-/* Begin PBXVariantGroup section */\n- 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {\n- isa = PBXVariantGroup;\n- children = (\n- 13B07FB21A68108700A75B9A /* Base */,\n- );\n- name = LaunchScreen.xib;\n- path = SquadCal;\n- sourceTree = \"<group>\";\n- };\n-/* End PBXVariantGroup section */\n-\n/* Begin XCBuildConfiguration section */\n13B07F941A680F5B00A75B9A /* Debug */ = {\nisa = XCBuildConfiguration;\n"
},
{
"change_type": "MODIFY",
"old_path": "native/ios/SquadCal/AppDelegate.m",
"new_path": "native/ios/SquadCal/AppDelegate.m",
"diff": "#import <React/RCTRootView.h>\n#import <React/RCTLinkingManager.h>\n#import \"RNNotifications.h\"\n-#import \"RNSplashScreen.h\"\n#import \"Orientation.h\"\n#import <UMCore/UMModuleRegistry.h>\n#import <UMReactNativeAdapter/UMNativeModulesProxy.h>\n#import <UMReactNativeAdapter/UMModuleRegistryAdapter.h>\n+#import <EXSplashScreen/EXSplashScreenService.h>\n@implementation AppDelegate\nrootViewController.view = rootView;\nself.window.rootViewController = rootViewController;\n[self.window makeKeyAndVisible];\n- [RNSplashScreen showSplash:@\"LaunchScreen\" inRootView:rootView];\n+\n+ // This prevents a very small flicker from occurring before expo-splash-screen is able to display\n+ UIView* launchScreenView = [[UIStoryboard storyboardWithName:@\"SplashScreen\" bundle:nil] instantiateInitialViewController].view;\n+ launchScreenView.frame = self.window.bounds;\n+ rootView.loadingView = launchScreenView;\n+ rootView.loadingViewFadeDelay = 0;\n+ rootView.loadingViewFadeDuration = 0.001;\n+\n+ // This sets up the splash screen to display until the JS side is ready for it to clear\n+ EXSplashScreenService *splashScreenService = (EXSplashScreenService *)[UMModuleRegistryProvider getSingletonModuleForClass:[EXSplashScreenService class]];\n+ [splashScreenService showSplashScreenFor:rootViewController];\n+\nreturn YES;\n}\nreturn extraModules;\n}\n-- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity\n- restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler\n+- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler\n{\nreturn [RCTLinkingManager application:application\ncontinueUserActivity:userActivity\n"
},
{
"change_type": "DELETE",
"old_path": "native/ios/SquadCal/Base.lproj/LaunchScreen.xib",
"new_path": null,
"diff": "-<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n-<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"13771\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" colorMatched=\"YES\">\n- <device id=\"retina4_0\" orientation=\"portrait\">\n- <adaptation id=\"fullscreen\"/>\n- </device>\n- <dependencies>\n- <deployment identifier=\"iOS\"/>\n- <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"13772\"/>\n- <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n- </dependencies>\n- <objects>\n- <placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File's Owner\"/>\n- <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>\n- <view contentMode=\"scaleToFill\" insetsLayoutMarginsFromSafeArea=\"NO\" id=\"iN0-l3-epB\">\n- <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"480\" height=\"480\"/>\n- <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n- <subviews>\n- <imageView clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFill\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" fixedFrame=\"YES\" insetsLayoutMarginsFromSafeArea=\"NO\" image=\"SplashBackground\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"D8N-qh-AaX\">\n- <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"480\" height=\"480\"/>\n- <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n- <color key=\"backgroundColor\" red=\"0.97408550146896233\" green=\"1\" blue=\"0.0014138489788160236\" alpha=\"0.0\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n- <color key=\"tintColor\" red=\"1\" green=\"0.0\" blue=\"0.092869963399396127\" alpha=\"0.0\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n- </imageView>\n- <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFit\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" image=\"Header\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"mei-nm-HW6\">\n- <rect key=\"frame\" x=\"152\" y=\"189\" width=\"177\" height=\"62\"/>\n- </imageView>\n- </subviews>\n- <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n- <constraints>\n- <constraint firstItem=\"mei-nm-HW6\" firstAttribute=\"centerX\" secondItem=\"iN0-l3-epB\" secondAttribute=\"centerX\" id=\"DPX-aQ-ZsI\"/>\n- <constraint firstItem=\"mei-nm-HW6\" firstAttribute=\"centerY\" secondItem=\"iN0-l3-epB\" secondAttribute=\"centerY\" constant=\"-20\" id=\"WNa-Ge-v0O\"/>\n- </constraints>\n- <nil key=\"simulatedStatusBarMetrics\"/>\n- <freeformSimulatedSizeMetrics key=\"simulatedDestinationMetrics\"/>\n- <point key=\"canvasLocation\" x=\"548\" y=\"455\"/>\n- </view>\n- </objects>\n- <resources>\n- <image name=\"Header\" width=\"177\" height=\"62\"/>\n- <image name=\"SplashBackground\" width=\"416\" height=\"739\"/>\n- </resources>\n-</document>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/ios/SquadCal/Info.debug.plist",
"new_path": "native/ios/SquadCal/Info.debug.plist",
"diff": "<string>remote-notification</string>\n</array>\n<key>UILaunchStoryboardName</key>\n- <string>LaunchScreen</string>\n+ <string>SplashScreen</string>\n<key>UIRequiredDeviceCapabilities</key>\n<array>\n<string>armv7</string>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/ios/SquadCal/Info.release.plist",
"new_path": "native/ios/SquadCal/Info.release.plist",
"diff": "<string>remote-notification</string>\n</array>\n<key>UILaunchStoryboardName</key>\n- <string>LaunchScreen</string>\n+ <string>SplashScreen</string>\n<key>UIRequiredDeviceCapabilities</key>\n<array>\n<string>armv7</string>\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Configure expo-splash-screen for iOS
We're using a storyboard now, as xibs are able to be deprecated |
129,187 | 05.06.2020 18:35:56 | 14,400 | bcd544f01005030cfa232046845ab1ecfd894b81 | [native] Configure expo-splash-screen for Android | [
{
"change_type": "MODIFY",
"old_path": "native/android/app/src/main/java/org/squadcal/MainActivity.java",
"new_path": "native/android/app/src/main/java/org/squadcal/MainActivity.java",
"diff": "package org.squadcal;\nimport com.facebook.react.ReactFragmentActivity;\n-import org.devio.rn.splashscreen.SplashScreen;\nimport android.os.Bundle;\nimport android.content.Intent;\nimport android.content.res.Configuration;\n@@ -10,6 +9,9 @@ import com.facebook.react.ReactActivityDelegate;\nimport com.facebook.react.ReactRootView;\nimport com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;\n+import expo.modules.splashscreen.SplashScreen;\n+import expo.modules.splashscreen.SplashScreenImageResizeMode;\n+\npublic class MainActivity extends ReactFragmentActivity {\n/**\n@@ -23,8 +25,8 @@ public class MainActivity extends ReactFragmentActivity {\n@Override\nprotected void onCreate(Bundle savedInstanceState) {\n- SplashScreen.show(this);\n- super.onCreate(null);\n+ super.onCreate(savedInstanceState);\n+ SplashScreen.show(this, SplashScreenImageResizeMode.NATIVE, ReactRootView.class);\n}\n@Override\n"
},
{
"change_type": "RENAME",
"old_path": "native/android/app/src/main/res/drawable/splash.xml",
"new_path": "native/android/app/src/main/res/drawable/splashscreen_image.xml",
"diff": ""
},
{
"change_type": "DELETE",
"old_path": "native/android/app/src/main/res/layout-w481dp-xxhdpi/launch_screen.xml",
"new_path": null,
"diff": "-<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n-<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n- android:orientation=\"vertical\"\n- android:layout_width=\"match_parent\"\n- android:layout_height=\"match_parent\"\n- android:background=\"@color/primary_dark\"\n- android:gravity=\"center\"\n->\n- <ImageView\n- android:layout_width=\"match_parent\"\n- android:layout_height=\"match_parent\"\n- android:scaleType=\"centerCrop\"\n- android:adjustViewBounds=\"true\"\n- android:src=\"@drawable/splash_background\"\n- />\n- <ImageView\n- android:layout_width=\"wrap_content\"\n- android:layout_height=\"wrap_content\"\n- android:layout_centerHorizontal=\"true\"\n- android:layout_centerVertical=\"true\"\n- android:scaleType=\"center\"\n- android:src=\"@drawable/splash_header\"\n- />\n-</RelativeLayout>\n"
},
{
"change_type": "DELETE",
"old_path": "native/android/app/src/main/res/layout-w481dp-xxxhdpi/launch_screen.xml",
"new_path": null,
"diff": "-<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n-<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n- android:orientation=\"vertical\"\n- android:layout_width=\"match_parent\"\n- android:layout_height=\"match_parent\"\n- android:background=\"@color/primary_dark\"\n- android:gravity=\"center\"\n->\n- <ImageView\n- android:layout_width=\"match_parent\"\n- android:layout_height=\"match_parent\"\n- android:scaleType=\"centerCrop\"\n- android:adjustViewBounds=\"true\"\n- android:src=\"@drawable/splash_background\"\n- />\n- <ImageView\n- android:layout_width=\"wrap_content\"\n- android:layout_height=\"wrap_content\"\n- android:layout_centerHorizontal=\"true\"\n- android:layout_centerVertical=\"true\"\n- android:scaleType=\"center\"\n- android:src=\"@drawable/splash_header\"\n- />\n-</RelativeLayout>\n"
},
{
"change_type": "DELETE",
"old_path": "native/android/app/src/main/res/layout-w801dp-xhdpi/launch_screen.xml",
"new_path": null,
"diff": "-<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n-<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n- android:orientation=\"vertical\"\n- android:layout_width=\"match_parent\"\n- android:layout_height=\"match_parent\"\n- android:background=\"@color/primary_dark\"\n- android:gravity=\"center\"\n->\n- <ImageView\n- android:layout_width=\"match_parent\"\n- android:layout_height=\"match_parent\"\n- android:scaleType=\"centerCrop\"\n- android:adjustViewBounds=\"true\"\n- android:src=\"@drawable/splash_background\"\n- />\n- <ImageView\n- android:layout_width=\"wrap_content\"\n- android:layout_height=\"wrap_content\"\n- android:layout_centerHorizontal=\"true\"\n- android:layout_centerVertical=\"true\"\n- android:scaleType=\"center\"\n- android:src=\"@drawable/splash_header\"\n- />\n-</RelativeLayout>\n"
},
{
"change_type": "DELETE",
"old_path": "native/android/app/src/main/res/layout-w801dp/launch_screen.xml",
"new_path": null,
"diff": "-<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n-<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n- android:orientation=\"vertical\"\n- android:layout_width=\"match_parent\"\n- android:layout_height=\"match_parent\"\n- android:background=\"@color/primary_dark\"\n- android:gravity=\"center\"\n->\n- <ImageView\n- android:layout_width=\"match_parent\"\n- android:layout_height=\"match_parent\"\n- android:scaleType=\"centerCrop\"\n- android:adjustViewBounds=\"true\"\n- android:src=\"@drawable/splash_background\"\n- />\n- <ImageView\n- android:layout_width=\"wrap_content\"\n- android:layout_height=\"wrap_content\"\n- android:layout_centerHorizontal=\"true\"\n- android:layout_centerVertical=\"true\"\n- android:scaleType=\"center\"\n- android:src=\"@drawable/splash_header\"\n- />\n-</RelativeLayout>\n"
},
{
"change_type": "DELETE",
"old_path": "native/android/app/src/main/res/layout-w961dp-hdpi/launch_screen.xml",
"new_path": null,
"diff": "-<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n-<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n- android:orientation=\"vertical\"\n- android:layout_width=\"match_parent\"\n- android:layout_height=\"match_parent\"\n- android:background=\"@color/primary_dark\"\n- android:gravity=\"center\"\n->\n- <ImageView\n- android:layout_width=\"match_parent\"\n- android:layout_height=\"match_parent\"\n- android:scaleType=\"centerCrop\"\n- android:adjustViewBounds=\"true\"\n- android:src=\"@drawable/splash_background\"\n- />\n- <ImageView\n- android:layout_width=\"wrap_content\"\n- android:layout_height=\"wrap_content\"\n- android:layout_centerHorizontal=\"true\"\n- android:layout_centerVertical=\"true\"\n- android:scaleType=\"center\"\n- android:src=\"@drawable/splash_header\"\n- />\n-</RelativeLayout>\n"
},
{
"change_type": "DELETE",
"old_path": "native/android/app/src/main/res/layout/launch_screen.xml",
"new_path": null,
"diff": "-<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n-<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n- android:orientation=\"vertical\"\n- android:layout_width=\"match_parent\"\n- android:layout_height=\"match_parent\"\n- android:background=\"@color/primary_dark\"\n- android:gravity=\"center\"\n->\n- <ImageView\n- android:layout_width=\"match_parent\"\n- android:layout_height=\"match_parent\"\n- android:scaleType=\"center\"\n- android:adjustViewBounds=\"true\"\n- android:src=\"@drawable/splash\"\n- />\n-</FrameLayout>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/android/app/src/main/res/values/styles.xml",
"new_path": "native/android/app/src/main/res/values/styles.xml",
"diff": "<style name=\"SplashTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n<item name=\"android:textColor\">#000000</item>\n<item name=\"android:windowNoTitle\">true</item>\n- <item name=\"android:background\">@drawable/splash</item>\n+ <item name=\"android:background\">@drawable/splashscreen_image</item>\n<item name=\"android:windowDrawsSystemBarBackgrounds\">false</item>\n</style>\n</resources>\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Configure expo-splash-screen for Android |
129,187 | 06.06.2020 00:18:10 | 14,400 | c6cc9f017cfbf6a7a0377d978cf803212d6c2504 | [native] Update packages I've sent PRs for
Yay three patches killed! | [
{
"change_type": "MODIFY",
"old_path": "native/ios/Podfile.lock",
"new_path": "native/ios/Podfile.lock",
"diff": "@@ -17,7 +17,8 @@ PODS:\n- UMCore\n- UMFileSystemInterface\n- UMImageLoaderInterface\n- - EXMediaLibrary (8.1.0):\n+ - EXMediaLibrary (8.2.1):\n+ - React\n- UMCore\n- UMFileSystemInterface\n- UMPermissionsInterface\n@@ -598,7 +599,7 @@ SPEC CHECKSUMS:\nEXFileSystem: cf4232ba7c62dc49b78c2d36005f97b6fddf0b01\nEXImageLoader: 5ad6896fa1ef2ee814b551873cbf7a7baccc694a\nEXImageManipulator: 97f61d14c292714d66884e83697e794f8cefe0b0\n- EXMediaLibrary: 02a13521d05ca381b08f7d745a9602569eade072\n+ EXMediaLibrary: 267cf1daca04a4d71d20c5be0b82701fe6056a08\nEXPermissions: 24b97f734ce9172d245a5be38ad9ccfcb6135964\nEXSplashScreen: 6568daa178c8e17f2197d29cea858f0e0b61b695\nFBLazyVector: aaeaf388755e4f29cd74acbc9e3b8da6d807c37f\n"
},
{
"change_type": "MODIFY",
"old_path": "native/package.json",
"new_path": "native/package.json",
"diff": "\"@react-native-community/cameraroll\": \"^1.5.2\",\n\"@react-native-community/masked-view\": \"^0.1.10\",\n\"@react-native-community/netinfo\": \"^4.4.0\",\n- \"@react-navigation/bottom-tabs\": \"^5.4.1\",\n- \"@react-navigation/native\": \"^5.2.6\",\n- \"@react-navigation/stack\": \"^5.3.1\",\n+ \"@react-navigation/bottom-tabs\": \"^5.5.2\",\n+ \"@react-navigation/native\": \"^5.5.1\",\n+ \"@react-navigation/stack\": \"^5.4.2\",\n\"base-64\": \"^0.1.0\",\n\"expo-image-manipulator\": \"^8.1.0\",\n- \"expo-media-library\": \"^8.1.0\",\n+ \"expo-media-library\": \"^8.2.1\",\n\"expo-splash-screen\": \"^0.2.3\",\n\"find-root\": \"^1.1.0\",\n\"hoist-non-react-statics\": \"^3.1.0\",\n"
},
{
"change_type": "DELETE",
"old_path": "patches/@react-navigation+core+5.5.2.patch",
"new_path": null,
"diff": "-diff --git a/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx b/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx\n-index 0acdc81..88facbb 100644\n---- a/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx\n-+++ b/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx\n-@@ -264,41 +264,36 @@ export default function useNavigationBuilder<\n- getKey,\n- } = React.useContext(NavigationStateContext);\n-\n-- const previousStateRef = React.useRef<\n-- NavigationState | PartialState<NavigationState> | undefined\n-- >();\n-- const initializedStateRef = React.useRef<State>();\n--\n-- let isFirstStateInitialization = false;\n--\n-- if (\n-- initializedStateRef.current === undefined ||\n-- currentState !== previousStateRef.current\n-- ) {\n-+ const [initializedState, isFirstStateInitialization] = React.useMemo(() => {\n- // If the current state isn't initialized on first render, we initialize it\n- // We also need to re-initialize it if the state passed from parent was changed (maybe due to reset)\n- // Otherwise assume that the state was provided as initial state\n- // So we need to rehydrate it to make it usable\n- if (currentState === undefined || !isStateValid(currentState)) {\n-- isFirstStateInitialization = true;\n-- initializedStateRef.current = router.getInitialState({\n-- routeNames,\n-- routeParamList,\n-- });\n-+ return [\n-+ router.getInitialState({\n-+ routeNames,\n-+ routeParamList,\n-+ }),\n-+ true,\n-+ ];\n- } else {\n-- initializedStateRef.current = router.getRehydratedState(\n-- currentState as PartialState<State>,\n-- {\n-+ return [\n-+ router.getRehydratedState(currentState as PartialState<State>, {\n- routeNames,\n- routeParamList,\n-- }\n-- );\n-+ }),\n-+ false,\n-+ ];\n- }\n-- }\n--\n-- React.useEffect(() => {\n-- previousStateRef.current = currentState;\n-- }, [currentState]);\n-+ // We explicitly don't include routeNames/routeParamList in the dep list\n-+ // below. We want to avoid forcing a new state to be calculated in cases\n-+ // where routeConfigs change without affecting routeNames/routeParamList.\n-+ // Instead, we handle changes to these in the nextState code below. Note\n-+ // that some changes to routeConfigs are explicitly ignored, such as changes\n-+ // to initialParams\n-+ // eslint-disable-next-line react-hooks/exhaustive-deps\n-+ }, [currentState, router, isStateValid]);\n-\n- let state =\n- // If the state isn't initialized, or stale, use the state we initialized instead\n-@@ -306,7 +301,7 @@ export default function useNavigationBuilder<\n- // So it'll be `undefined` or stale untill the first navigation event happens\n- isStateInitialized(currentState)\n- ? (currentState as State)\n-- : (initializedStateRef.current as State);\n-+ : (initializedState as State);\n-\n- let nextState: State = state;\n-\n-@@ -374,6 +369,12 @@ export default function useNavigationBuilder<\n- // eslint-disable-next-line react-hooks/exhaustive-deps\n- }, []);\n-\n-+ // We initialize this ref here to avoid a new getState getting initialized\n-+ // whenever initializedState changes. We want getState to have access to the\n-+ // latest initializedState, but don't need it to change when that happens\n-+ const initializedStateRef = React.useRef<State>();\n-+ initializedStateRef.current = initializedState;\n-+\n- const getState = React.useCallback((): State => {\n- const currentState = getCurrentState();\n-\n"
},
{
"change_type": "DELETE",
"old_path": "patches/@react-navigation+stack+5.3.1.patch",
"new_path": null,
"diff": "-diff --git a/node_modules/@react-navigation/stack/src/views/Stack/CardContainer.tsx b/node_modules/@react-navigation/stack/src/views/Stack/CardContainer.tsx\n-index 2665164..6fd10f5 100644\n---- a/node_modules/@react-navigation/stack/src/views/Stack/CardContainer.tsx\n-+++ b/node_modules/@react-navigation/stack/src/views/Stack/CardContainer.tsx\n-@@ -55,6 +55,7 @@ type Props = TransitionPreset & {\n- headerMode: StackHeaderMode;\n- headerShown?: boolean;\n- headerTransparent?: boolean;\n-+ absoluteFloatHeader: boolean;\n- headerHeight: number;\n- onHeaderHeightChange: (props: {\n- route: Route<string>;\n-@@ -85,6 +86,7 @@ function CardContainer({\n- headerShown,\n- headerStyleInterpolator,\n- headerTransparent,\n-+ absoluteFloatHeader,\n- headerHeight,\n- onHeaderHeightChange,\n- index,\n-@@ -188,7 +190,7 @@ function CardContainer({\n- pointerEvents={active ? 'box-none' : pointerEvents}\n- pageOverflowEnabled={headerMode === 'screen' && mode === 'card'}\n- containerStyle={\n-- headerMode === 'float' && !headerTransparent && headerShown !== false\n-+ absoluteFloatHeader && !headerTransparent && headerShown !== false\n- ? { marginTop: headerHeight }\n- : null\n- }\n-diff --git a/node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx b/node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx\n-index b47a50d..f8503c9 100755\n---- a/node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx\n-+++ b/node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx\n-@@ -42,6 +42,7 @@ type Props = {\n- routes: Route<string>[];\n- openingRouteKeys: string[];\n- closingRouteKeys: string[];\n-+ replacingRouteKeys: string[];\n- onOpenRoute: (props: { route: Route<string> }) => void;\n- onCloseRoute: (props: { route: Route<string> }) => void;\n- getPreviousRoute: (props: {\n-@@ -299,7 +300,7 @@ export default class CardStack extends React.Component<Props, State> {\n- props.insets,\n- state.descriptors,\n- layout,\n-- {}\n-+ state.headerHeights\n- ),\n- };\n- });\n-@@ -334,6 +335,55 @@ export default class CardStack extends React.Component<Props, State> {\n- return state.routes[state.index];\n- };\n-\n-+ private getSomeFloatHeaderNeedsAbsolutePositioning() {\n-+ if (this.props.headerMode !== 'float') {\n-+ return false;\n-+ }\n-+\n-+ const {\n-+ closingRouteKeys,\n-+ openingRouteKeys,\n-+ replacingRouteKeys,\n-+ } = this.props;\n-+ const focusedRoute = this.getFocusedRoute();\n-+ const visibleKeys = new Set([\n-+ ...closingRouteKeys,\n-+ ...replacingRouteKeys,\n-+ focusedRoute.key,\n-+ ]);\n-+ const prevFocusedRoute = this.props.getPreviousRoute({\n-+ route: focusedRoute,\n-+ });\n-+ if (prevFocusedRoute) {\n-+ visibleKeys.add(prevFocusedRoute.key);\n-+ }\n-+ if (openingRouteKeys.length > 0) {\n-+ for (let scene of this.state.scenes) {\n-+ const { route } = scene;\n-+ if (!openingRouteKeys.includes(route.key)) {\n-+ continue;\n-+ }\n-+ const prevRoute = this.props.getPreviousRoute({ route });\n-+ if (prevRoute) {\n-+ visibleKeys.add(prevRoute.key);\n-+ }\n-+ }\n-+ }\n-+\n-+ for (let scene of this.state.scenes) {\n-+ const { route, descriptor } = scene;\n-+ if (!visibleKeys.has(route.key)) {\n-+ continue;\n-+ }\n-+ const options = descriptor ? descriptor.options : {};\n-+ const { headerTransparent, headerShown } = options;\n-+ if (headerTransparent || headerShown === false) {\n-+ return true;\n-+ }\n-+ }\n-+ return false;\n-+ }\n-+\n- render() {\n- const {\n- mode,\n-@@ -361,6 +411,7 @@ export default class CardStack extends React.Component<Props, State> {\n- const focusedRoute = state.routes[state.index];\n- const focusedDescriptor = descriptors[focusedRoute.key];\n- const focusedOptions = focusedDescriptor ? focusedDescriptor.options : {};\n-+ const absoluteFloatHeader = this.getSomeFloatHeaderNeedsAbsolutePositioning();\n-\n- let defaultTransitionPreset =\n- mode === 'modal' ? ModalTransition : DefaultTransition;\n-@@ -383,8 +434,31 @@ export default class CardStack extends React.Component<Props, State> {\n- // For modals, usually we want the screen underneath to be visible, so also disable it there\n- const isScreensEnabled = Platform.OS !== 'ios' && mode !== 'modal';\n-\n-+ let floatingHeader;\n-+ if (headerMode === 'float') {\n-+ floatingHeader = renderHeader({\n-+ mode: 'float',\n-+ layout,\n-+ insets: { top, right, bottom, left },\n-+ scenes,\n-+ getPreviousRoute,\n-+ getFocusedRoute: this.getFocusedRoute,\n-+ onContentHeightChange: this.handleHeaderLayout,\n-+ gestureDirection:\n-+ focusedOptions.gestureDirection !== undefined\n-+ ? focusedOptions.gestureDirection\n-+ : defaultTransitionPreset.gestureDirection,\n-+ styleInterpolator:\n-+ focusedOptions.headerStyleInterpolator !== undefined\n-+ ? focusedOptions.headerStyleInterpolator\n-+ : defaultTransitionPreset.headerStyleInterpolator,\n-+ style: absoluteFloatHeader ? styles.floating : undefined,\n-+ });\n-+ }\n-+\n- return (\n- <React.Fragment>\n-+ {absoluteFloatHeader ? null : floatingHeader}\n- <MaybeScreenContainer\n- enabled={isScreensEnabled}\n- style={styles.container}\n-@@ -523,6 +597,7 @@ export default class CardStack extends React.Component<Props, State> {\n- headerMode={headerMode}\n- headerShown={headerShown}\n- headerTransparent={headerTransparent}\n-+ absoluteFloatHeader={absoluteFloatHeader}\n- renderHeader={renderHeader}\n- renderScene={renderScene}\n- onOpenRoute={onOpenRoute}\n-@@ -537,26 +612,7 @@ export default class CardStack extends React.Component<Props, State> {\n- );\n- })}\n- </MaybeScreenContainer>\n-- {headerMode === 'float'\n-- ? renderHeader({\n-- mode: 'float',\n-- layout,\n-- insets: { top, right, bottom, left },\n-- scenes,\n-- getPreviousRoute,\n-- getFocusedRoute: this.getFocusedRoute,\n-- onContentHeightChange: this.handleHeaderLayout,\n-- gestureDirection:\n-- focusedOptions.gestureDirection !== undefined\n-- ? focusedOptions.gestureDirection\n-- : defaultTransitionPreset.gestureDirection,\n-- styleInterpolator:\n-- focusedOptions.headerStyleInterpolator !== undefined\n-- ? focusedOptions.headerStyleInterpolator\n-- : defaultTransitionPreset.headerStyleInterpolator,\n-- style: styles.floating,\n-- })\n-- : null}\n-+ {absoluteFloatHeader ? floatingHeader : null}\n- </React.Fragment>\n- );\n- }\n-diff --git a/node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx b/node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx\n-index 1f73567..300d826 100644\n---- a/node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx\n-+++ b/node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx\n-@@ -417,6 +417,7 @@ export default class StackView extends React.Component<Props, State> {\n- descriptors,\n- openingRouteKeys,\n- closingRouteKeys,\n-+ replacingRouteKeys,\n- } = this.state;\n-\n- const headerMode =\n-@@ -438,6 +439,7 @@ export default class StackView extends React.Component<Props, State> {\n- routes={routes}\n- openingRouteKeys={openingRouteKeys}\n- closingRouteKeys={closingRouteKeys}\n-+ replacingRouteKeys={replacingRouteKeys}\n- onOpenRoute={this.handleOpenRoute}\n- onCloseRoute={this.handleCloseRoute}\n- onTransitionStart={this.handleTransitionStart}\n"
},
{
"change_type": "DELETE",
"old_path": "patches/expo-media-library+8.1.0.patch",
"new_path": null,
"diff": "-diff --git a/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/GetAssets.java b/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/GetAssets.java\n-index fa7b518..6ff3f08 100644\n---- a/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/GetAssets.java\n-+++ b/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/GetAssets.java\n-@@ -1,6 +1,7 @@\n- package expo.modules.medialibrary;\n-\n- import android.content.Context;\n-+import android.content.ContentResolver;\n- import android.database.Cursor;\n- import android.os.AsyncTask;\n- import android.os.Bundle;\n-@@ -37,7 +38,8 @@ class GetAssets extends AsyncTask<Void, Void, Void> {\n- final String order = getQueryInfo.getOrder();\n- final int limit = getQueryInfo.getLimit();\n- final int offset = getQueryInfo.getOffset();\n-- try (Cursor assets = mContext.getContentResolver().query(\n-+ ContentResolver contentResolver = mContext.getContentResolver();\n-+ try (Cursor assets = contentResolver.query(\n- EXTERNAL_CONTENT,\n- ASSET_PROJECTION,\n- selection,\n-@@ -47,7 +49,7 @@ class GetAssets extends AsyncTask<Void, Void, Void> {\n- mPromise.reject(ERROR_UNABLE_TO_LOAD, \"Could not get assets. Query returns null.\");\n- } else {\n- ArrayList<Bundle> assetsInfo = new ArrayList<>();\n-- putAssetsInfo(assets, assetsInfo, limit, offset, false);\n-+ putAssetsInfo(contentResolver, assets, assetsInfo, limit, offset, false);\n- response.putParcelableArrayList(\"assets\", assetsInfo);\n- response.putBoolean(\"hasNextPage\", !assets.isAfterLast());\n- response.putString(\"endCursor\", Integer.toString(assets.getPosition()));\n-diff --git a/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/MediaLibraryConstants.java b/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/MediaLibraryConstants.java\n-index 5e3eeaf..35d459c 100644\n---- a/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/MediaLibraryConstants.java\n-+++ b/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/MediaLibraryConstants.java\n-@@ -56,8 +56,8 @@ final class MediaLibraryConstants {\n- put(SORT_BY_CREATION_TIME, MediaStore.Images.Media.DATE_TAKEN);\n- put(SORT_BY_MODIFICATION_TIME, MediaStore.Images.Media.DATE_MODIFIED);\n- put(SORT_BY_MEDIA_TYPE, MediaStore.Files.FileColumns.MEDIA_TYPE);\n-- put(SORT_BY_WIDTH, MediaStore.Images.Media.WIDTH);\n-- put(SORT_BY_HEIGHT, MediaStore.Images.Media.HEIGHT);\n-+ put(SORT_BY_WIDTH, MediaStore.MediaColumns.WIDTH);\n-+ put(SORT_BY_HEIGHT, MediaStore.MediaColumns.HEIGHT);\n- put(SORT_BY_DURATION, MediaStore.Video.VideoColumns.DURATION);\n- }\n- };\n-@@ -70,8 +70,8 @@ final class MediaLibraryConstants {\n- MediaStore.Files.FileColumns.DISPLAY_NAME,\n- MediaStore.Images.Media.DATA,\n- MediaStore.Files.FileColumns.MEDIA_TYPE,\n-- MediaStore.Images.Media.WIDTH,\n-- MediaStore.Images.Media.HEIGHT,\n-+ MediaStore.MediaColumns.WIDTH,\n-+ MediaStore.MediaColumns.HEIGHT,\n- MediaStore.Images.Media.DATE_TAKEN,\n- MediaStore.Images.Media.DATE_MODIFIED,\n- MediaStore.Images.Media.LATITUDE,\n-diff --git a/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/MediaLibraryModule.java b/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/MediaLibraryModule.java\n-index bfe25f3..edde485 100644\n---- a/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/MediaLibraryModule.java\n-+++ b/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/MediaLibraryModule.java\n-@@ -164,7 +164,7 @@ public class MediaLibraryModule extends ExportedModule {\n-\n- @ExpoMethod\n- public void getAssetInfoAsync(String assetId, Promise promise) {\n-- if (isMissingPermissions()) {\n-+ if (isMissingReadPermissions()) {\n- promise.reject(ERROR_NO_PERMISSIONS, ERROR_NO_PERMISSIONS_MESSAGE);\n- return;\n- }\n-@@ -221,7 +221,7 @@ public class MediaLibraryModule extends ExportedModule {\n-\n- @ExpoMethod\n- public void getAssetsAsync(Map<String, Object> assetOptions, Promise promise) {\n-- if (isMissingPermissions()) {\n-+ if (isMissingReadPermissions()) {\n- promise.reject(ERROR_NO_PERMISSIONS, ERROR_NO_PERMISSIONS_MESSAGE);\n- return;\n- }\n-@@ -285,6 +285,15 @@ public class MediaLibraryModule extends ExportedModule {\n- return !permissionsManager.hasGrantedPermissions(READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE);\n- }\n-\n-+ private boolean isMissingReadPermissions() {\n-+ Permissions permissionsManager = mModuleRegistry.getModule(Permissions.class);\n-+ if (permissionsManager == null) {\n-+ return false;\n-+ }\n-+\n-+ return !permissionsManager.hasGrantedPermissions(READ_EXTERNAL_STORAGE);\n-+ }\n-+\n- private boolean isMissingWritePermission() {\n- Permissions permissionsManager = mModuleRegistry.getModule(Permissions.class);\n- if (permissionsManager == null) {\n-diff --git a/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/MediaLibraryUtils.java b/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/MediaLibraryUtils.java\n-index da5bd28..6861e02 100644\n---- a/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/MediaLibraryUtils.java\n-+++ b/node_modules/expo-media-library/android/src/main/java/expo/modules/medialibrary/MediaLibraryUtils.java\n-@@ -1,17 +1,23 @@\n- package expo.modules.medialibrary;\n-\n- import android.content.Context;\n-+import android.content.ContentResolver;\n-+import android.content.res.AssetFileDescriptor;\n- import android.database.Cursor;\n- import android.graphics.BitmapFactory;\n- import android.os.Bundle;\n-+import android.media.MediaMetadataRetriever;\n- import android.provider.MediaStore;\n- import android.provider.MediaStore.Files;\n- import android.provider.MediaStore.Images.Media;\n- import androidx.exifinterface.media.ExifInterface;\n- import android.text.TextUtils;\n-+import android.net.Uri;\n-+import android.util.Log;\n-\n- import java.io.File;\n- import java.io.FileInputStream;\n-+import java.io.FileNotFoundException;\n- import java.io.FileOutputStream;\n- import java.io.IOException;\n- import java.nio.channels.FileChannel;\n-@@ -96,7 +102,8 @@ final class MediaLibraryUtils {\n- }\n-\n- static void queryAssetInfo(Context context, final String selection, final String[] selectionArgs, boolean fullInfo, Promise promise) {\n-- try (Cursor asset = context.getContentResolver().query(\n-+ ContentResolver contentResolver = context.getContentResolver();\n-+ try (Cursor asset = contentResolver.query(\n- EXTERNAL_CONTENT,\n- ASSET_PROJECTION,\n- selection,\n-@@ -109,7 +116,7 @@ final class MediaLibraryUtils {\n- if (asset.getCount() == 1) {\n- asset.moveToFirst();\n- ArrayList<Bundle> array = new ArrayList<>();\n-- putAssetsInfo(asset, array, 1, 0, fullInfo);\n-+ putAssetsInfo(contentResolver, asset, array, 1, 0, fullInfo);\n- // actually we want to return just the first item, but array.getMap returns ReadableMap\n- // which is not compatible with promise.resolve and there is no simple solution to convert\n- // ReadableMap to WritableMap so it's easier to return an array and pick the first item on JS side\n-@@ -126,7 +133,7 @@ final class MediaLibraryUtils {\n- }\n- }\n-\n-- static void putAssetsInfo(Cursor cursor, ArrayList<Bundle> response, int limit, int offset, boolean fullInfo) throws IOException {\n-+ static void putAssetsInfo(ContentResolver contentResolver, Cursor cursor, ArrayList<Bundle> response, int limit, int offset, boolean fullInfo) throws IOException {\n- final int idIndex = cursor.getColumnIndex(Media._ID);\n- final int filenameIndex = cursor.getColumnIndex(Media.DISPLAY_NAME);\n- final int mediaTypeIndex = cursor.getColumnIndex(Files.FileColumns.MEDIA_TYPE);\n-@@ -142,9 +149,16 @@ final class MediaLibraryUtils {\n- return;\n- }\n- for (int i = 0; i < limit && !cursor.isAfterLast(); i++) {\n-- String localUri = \"file://\" + cursor.getString(localUriIndex);\n-+ String path = cursor.getString(localUriIndex);\n-+ String localUri = \"file://\" + path;\n- int mediaType = cursor.getInt(mediaTypeIndex);\n-- int[] size = getSizeFromCursor(cursor, mediaType, localUriIndex);\n-+\n-+ ExifInterface exifInterface = null;\n-+ if (mediaType == Files.FileColumns.MEDIA_TYPE_IMAGE) {\n-+ exifInterface = new ExifInterface(path);\n-+ }\n-+\n-+ int[] size = getSizeFromCursor(contentResolver, exifInterface, cursor, mediaType, localUriIndex);\n-\n- Bundle asset = new Bundle();\n- asset.putString(\"id\", cursor.getString(idIndex));\n-@@ -159,8 +173,8 @@ final class MediaLibraryUtils {\n- asset.putString(\"albumId\", cursor.getString(albumIdIndex));\n-\n- if (fullInfo) {\n-- if (mediaType == Files.FileColumns.MEDIA_TYPE_IMAGE) {\n-- getExifFullInfo(cursor, asset);\n-+ if (exifInterface != null) {\n-+ getExifFullInfo(exifInterface, asset);\n- }\n-\n- asset.putString(\"localUri\", localUri);\n-@@ -213,25 +227,68 @@ final class MediaLibraryUtils {\n- return MEDIA_TYPES.get(mediaType);\n- }\n-\n-- static int[] getSizeFromCursor(Cursor cursor, int mediaType, int localUriIndex){\n-+ static int[] getSizeFromCursor(ContentResolver contentResolver, ExifInterface exifInterface, Cursor cursor, int mediaType, int localUriIndex) throws IOException {\n-+ final String uri = cursor.getString(localUriIndex);\n-+\n-+ if (mediaType == Files.FileColumns.MEDIA_TYPE_VIDEO) {\n-+ Uri videoUri = Uri.parse(\"file://\" + uri);\n-+ MediaMetadataRetriever retriever = null;\n-+ try (AssetFileDescriptor photoDescriptor = contentResolver.openAssetFileDescriptor(videoUri, \"r\")) {\n-+ retriever = new MediaMetadataRetriever();\n-+ retriever.setDataSource(photoDescriptor.getFileDescriptor());\n-+ int videoWidth = Integer.parseInt(\n-+ retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_WIDTH)\n-+ );\n-+ int videoHeight = Integer.parseInt(\n-+ retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT)\n-+ );\n-+ int videoOrientation = Integer.parseInt(\n-+ retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_ROTATION)\n-+ );\n-+ return maybeRotateAssetSize(videoWidth, videoHeight, videoOrientation);\n-+ } catch (NumberFormatException e) {\n-+ Log.e(\"expo-media-library\", \"MediaMetadataRetriever unexpectedly returned non-integer: \" + e.getMessage());\n-+ } catch (FileNotFoundException e) {\n-+ Log.e(\"expo-media-library\", String.format(\"ContentResolver failed to read %s: %s\", uri, e.getMessage()));\n-+ } finally {\n-+ if (retriever != null) {\n-+ retriever.release();\n-+ }\n-+ }\n-+ }\n-+\n-+ final int widthIndex = cursor.getColumnIndex(MediaStore.MediaColumns.WIDTH);\n-+ final int heightIndex = cursor.getColumnIndex(MediaStore.MediaColumns.HEIGHT);\n- final int orientationIndex = cursor.getColumnIndex(Media.ORIENTATION);\n-- final int widthIndex = cursor.getColumnIndex(Media.WIDTH);\n-- final int heightIndex = cursor.getColumnIndex(Media.HEIGHT);\n--\n-- int[] size;\n-- // If image doesn't have the required information, we can get them from Bitmap.Options\n-- if ((cursor.getType(widthIndex) == Cursor.FIELD_TYPE_NULL ||\n-- cursor.getType(heightIndex) == Cursor.FIELD_TYPE_NULL) &&\n-- mediaType == Files.FileColumns.MEDIA_TYPE_IMAGE) {\n-+ int width = cursor.getInt(widthIndex);\n-+ int height = cursor.getInt(heightIndex);\n-+ int orientation = cursor.getInt(orientationIndex);\n-+\n-+ // If the image doesn't have the required information, we can get them from Bitmap.Options\n-+ if (mediaType == Files.FileColumns.MEDIA_TYPE_IMAGE && (width <= 0 || height <= 0)) {\n- BitmapFactory.Options options = new BitmapFactory.Options();\n- options.inJustDecodeBounds = true;\n-+ BitmapFactory.decodeFile(uri, options);\n-+ width = options.outWidth;\n-+ height = options.outHeight;\n-+ }\n-\n-- BitmapFactory.decodeFile(cursor.getString(localUriIndex), options);\n-- size = maybeRotateAssetSize(options.outWidth, options.outHeight, cursor.getInt(orientationIndex));\n-- } else {\n-- size = maybeRotateAssetSize(cursor.getInt(widthIndex), cursor.getInt(heightIndex), cursor.getInt(orientationIndex));\n-+ if (exifInterface != null) {\n-+ int exifOrientation = exifInterface.getAttributeInt(\n-+ ExifInterface.TAG_ORIENTATION,\n-+ ExifInterface.ORIENTATION_NORMAL\n-+ );\n-+ if (\n-+ exifOrientation == ExifInterface.ORIENTATION_ROTATE_90 ||\n-+ exifOrientation == ExifInterface.ORIENTATION_ROTATE_270 ||\n-+ exifOrientation == ExifInterface.ORIENTATION_TRANSPOSE ||\n-+ exifOrientation == ExifInterface.ORIENTATION_TRANSVERSE\n-+ ) {\n-+ orientation = 90;\n-+ }\n- }\n-- return size;\n-+\n-+ return maybeRotateAssetSize(width, height, orientation);\n- }\n-\n- static int[] maybeRotateAssetSize(int width, int height, int orientation) {\n-@@ -265,9 +322,7 @@ final class MediaLibraryUtils {\n- return TextUtils.join(\",\", result);\n- }\n-\n-- static void getExifFullInfo(Cursor cursor, Bundle response) throws IOException {\n-- File input = new File(cursor.getString(cursor.getColumnIndex(Media.DATA)));\n-- ExifInterface exifInterface = new ExifInterface(input.getPath());\n-+ static void getExifFullInfo(ExifInterface exifInterface, Bundle response) {\n- Bundle exifMap = new Bundle();\n- for (String[] tagInfo : exifTags) {\n- String name = tagInfo[1];\n-diff --git a/node_modules/expo-media-library/ios/EXMediaLibrary.podspec b/node_modules/expo-media-library/ios/EXMediaLibrary.podspec\n-index 7cc9e70..a5b5336 100644\n---- a/node_modules/expo-media-library/ios/EXMediaLibrary.podspec\n-+++ b/node_modules/expo-media-library/ios/EXMediaLibrary.podspec\n-@@ -18,4 +18,5 @@ Pod::Spec.new do |s|\n-\n- s.dependency 'UMCore'\n- s.dependency 'UMPermissionsInterface'\n-+ s.dependency 'UMFileSystemInterface'\n- end\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "resolved \"https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-4.4.0.tgz#a18eb9ba082b6aca6add004b4a918250ad7d13bc\"\nintegrity sha512-qqNWMOsrDjj/daqV21ID2T8mNUjZD4pdx3PuWyE65gzKh2w+oMnzKb+J0NbLyZPn3wwLwU1+Cpf58A0ff5szjQ==\n-\"@react-navigation/bottom-tabs@^5.4.1\":\n- version \"5.4.1\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/bottom-tabs/-/bottom-tabs-5.4.1.tgz#85eef2c942658f491cf5f056db4f0ba36e953f03\"\n- integrity sha512-5BrxcIZMMQf+KKRDg1o7Qm008nZU4rCGoxspMGGaSFrOxFQo38Nivt7kyunQNYVpkRy6/NPpOOTcvkIMtLLXNA==\n+\"@react-navigation/bottom-tabs@^5.5.2\":\n+ version \"5.5.2\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/bottom-tabs/-/bottom-tabs-5.5.2.tgz#b3d95e2a05eba47f7aa34fb9f2331ddede0ee4d5\"\n+ integrity sha512-unopBnv8i3hcjhp2qdhgSwF6GFnhkdtPwGbvJMOG8Na19oPscT8UQDUbHZKs9wiJMk2Q0usEz2PbFh8GQGAf7w==\ndependencies:\ncolor \"^3.1.2\"\nreact-native-iphone-x-helper \"^1.2.1\"\n-\"@react-navigation/core@^5.5.2\":\n- version \"5.5.2\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/core/-/core-5.5.2.tgz#14e844287225fe7a41b471262f282ecd2d0404ea\"\n- integrity sha512-nYPDpwPVZ3+S8YSj5ktMKgxQq9B298An4nfDhIobLNqMifvTXC15kWTPbMAWSYdwZr5tbw7SniP6+jXFZgfIlQ==\n+\"@react-navigation/core@^5.10.0\":\n+ version \"5.10.0\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/core/-/core-5.10.0.tgz#aee9e22a5f0f458ebeadc155f347b13eb5ff5212\"\n+ integrity sha512-cVQTj5FtZHWuymjZMP50RVXYpkQUbo1zQPjxJl+UfBUh7u9nKexknajBhjYbZq61uDE4MmPE8qAqIEJHKeR4Hg==\ndependencies:\n- \"@react-navigation/routers\" \"^5.4.4\"\n+ \"@react-navigation/routers\" \"^5.4.7\"\nescape-string-regexp \"^4.0.0\"\nnanoid \"^3.1.5\"\nquery-string \"^6.12.1\"\nreact-is \"^16.13.0\"\nuse-subscription \"^1.4.0\"\n-\"@react-navigation/native@^5.2.6\":\n- version \"5.2.6\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/native/-/native-5.2.6.tgz#e17f89a1939b8f2bebcc0e8a87dfe68ff3a9c995\"\n- integrity sha512-j4oPs5fjD8jm8n2tDc7zyXrqa3RmE+iiQUUmdhi2yEMs6YUGCiON7AyZiJGONKQ+GCzyVfK1GHyVtnihvKvp3w==\n+\"@react-navigation/native@^5.5.1\":\n+ version \"5.5.1\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/native/-/native-5.5.1.tgz#e669d9561e54d86b1315637b8d5630dc55ee9383\"\n+ integrity sha512-5pzsfvLdnvqfrWgTMCLDFaGK6Sj30p7tAMhUGneV2oGlx0OIbhgc6/04UUMpKEmAS2PaC/GZa1LQIsSVWDewvw==\ndependencies:\n- \"@react-navigation/core\" \"^5.5.2\"\n+ \"@react-navigation/core\" \"^5.10.0\"\n+ nanoid \"^3.1.9\"\n-\"@react-navigation/routers@^5.4.4\":\n- version \"5.4.4\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/routers/-/routers-5.4.4.tgz#3b5e1a55edb73a506a82db59081ad434c0ce1aab\"\n- integrity sha512-Q8ZIubVYc1569JOs2oMWbhNXBNzZHvRfP5cEZ6/ksj9cPF7DkwOXsAdF0b+Oe0ei0f7OaK9LTRmfiNdtAPWVzw==\n+\"@react-navigation/routers@^5.4.7\":\n+ version \"5.4.7\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/routers/-/routers-5.4.7.tgz#05f85a099d7ee5677edeced98959e4b87562e3b5\"\n+ integrity sha512-J+lQYDbEsyhAjcPpWY6ZJYEkGiZcPX62hNtySruShjbIEnI9gm3rC+BHdcrP/lufeWxWGFhI8CN7NSJGgP/Nmg==\ndependencies:\nnanoid \"^3.1.5\"\n-\"@react-navigation/stack@^5.3.1\":\n- version \"5.3.1\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/stack/-/stack-5.3.1.tgz#7810b0e16faadce181a5a718002addc8b2680839\"\n- integrity sha512-LACbV6TaVwIOfJCfq4sHUYdfMm1JgtT6d3bfFFJk8hub8VQtHYdm9YdpKVk28uJbNGFqBIr4lqekM0uqZgJ+Kw==\n+\"@react-navigation/stack@^5.4.2\":\n+ version \"5.4.2\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/stack/-/stack-5.4.2.tgz#ca4e77e8ab55b446e44f656068702825ec3b29d3\"\n+ integrity sha512-EG8DqHsfg257XeNaO6MIeAnPClekmr8po3PYikezyXon02rJUmHU4px25/PWOvh1hTFiH40W4WYBKzrzMBFaOQ==\ndependencies:\ncolor \"^3.1.2\"\nreact-native-iphone-x-helper \"^1.2.1\"\n@@ -5894,10 +5895,10 @@ expo-image-manipulator@^8.1.0:\nresolved \"https://registry.yarnpkg.com/expo-image-manipulator/-/expo-image-manipulator-8.1.0.tgz#63ae66e1a65e5be8c6ee7036fe88d53af551853f\"\nintegrity sha512-ephPXtzEx32Js1SQ1B2IXdpi4Gn34DIMQGAOwrwOPfUuWXQX9jGxyX3tktIGMmQ7lHueVr0a8zdh6ME0YGHjkw==\n-expo-media-library@^8.1.0:\n- version \"8.1.0\"\n- resolved \"https://registry.yarnpkg.com/expo-media-library/-/expo-media-library-8.1.0.tgz#f5d4b24819aa518e69d971f92b55c12f60c85ba5\"\n- integrity sha512-2oO6UtV4akgX9o5Ok9BRwLh5NZzDk43QBW5RP/EHVSzuVn2yn7IXstmr9wnTl1BpqkPoV8u6w3g9EeU1I2Jljw==\n+expo-media-library@^8.2.1:\n+ version \"8.2.1\"\n+ resolved \"https://registry.yarnpkg.com/expo-media-library/-/expo-media-library-8.2.1.tgz#2296298dfcf2b19b56c201cb62b2b67c197bede0\"\n+ integrity sha512-V0XDewHE7MFgwNAUZlruAabMCxM9uf9FfmgKIcoolWq/HGTC0GmwqN1QZIrKEejkqQLJWbUP8HoBWGx7IXz3ng==\nexpo-permissions@~8.1.0:\nversion \"8.1.0\"\n@@ -9869,6 +9870,11 @@ nanoid@^3.1.5:\nresolved \"https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.6.tgz#f591cc886c14e5b2c4da753db0ac547fac1fee6a\"\nintegrity sha512-Kp/sUTkDjStVFvT4W0OO1Z1jJWhnxIa1TNJ1F+G27IPC+FOc3aqbX8OMptcZE4vRrzREjttOHut5PbC11F7KBQ==\n+nanoid@^3.1.9:\n+ version \"3.1.9\"\n+ resolved \"https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.9.tgz#1f148669c70bb2072dc5af0666e46edb6cd31fb2\"\n+ integrity sha512-fFiXlFo4Wkuei3i6w9SQI6yuzGRTGi8Z2zZKZpUxv/bQlBi4jtbVPBSNFZHQA9PNjofWqtIa8p+pnsc0kgZrhQ==\n+\nnanomatch@^1.2.9:\nversion \"1.2.13\"\nresolved \"https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119\"\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Update packages I've sent PRs for
Yay three patches killed! |
129,187 | 06.06.2020 12:50:08 | 14,400 | 2e1d6b0978dde1c65351b5b282bcf4f2f663397a | [native] Only call SplashScreen.hideAsync once | [
{
"change_type": "MODIFY",
"old_path": "native/navigation/app-navigator.react.js",
"new_path": "native/navigation/app-navigator.react.js",
"diff": "@@ -11,6 +11,7 @@ import * as SplashScreen from 'expo-splash-screen';\nimport Icon from 'react-native-vector-icons/FontAwesome';\nSplashScreen.preventAutoHideAsync();\n+let splashScreenHasHidden = false;\nimport {\nCalendarRouteName,\n@@ -126,6 +127,10 @@ function AppNavigator(props: AppNavigatorProps) {\n}, [setNavStateInitialized]);\nReact.useEffect(() => {\n+ if (splashScreenHasHidden) {\n+ return;\n+ }\n+ splashScreenHasHidden = true;\n(async () => {\nawait waitForInteractions();\nawait SplashScreen.hideAsync();\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Only call SplashScreen.hideAsync once |
129,187 | 06.06.2020 13:00:35 | 14,400 | 0ea3c20459dc350c28b24886dffb3e8c178b3896 | [native] LayoutAnimation when a new chat message appears | [
{
"change_type": "MODIFY",
"old_path": "native/chat/message-list.react.js",
"new_path": "native/chat/message-list.react.js",
"diff": "@@ -17,7 +17,12 @@ import type { NavigationRoute } from '../navigation/route-names';\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\n-import { View, FlatList, TouchableWithoutFeedback } from 'react-native';\n+import {\n+ View,\n+ FlatList,\n+ TouchableWithoutFeedback,\n+ LayoutAnimation,\n+} from 'react-native';\nimport _sum from 'lodash/fp/sum';\nimport _find from 'lodash/fp/find';\nimport { createSelector } from 'reselect';\n@@ -186,6 +191,8 @@ class MessageList extends React.PureComponent<Props, State> {\n(newListData.length > oldListData.length || this.props.startReached)\n) {\nthis.loadingFromScroll = false;\n+ } else if (newListData.length > oldListData.length) {\n+ LayoutAnimation.easeInEaseOut();\n}\nconst modalIsOpen = MessageList.modalOpen(this.props);\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] LayoutAnimation when a new chat message appears |
129,187 | 07.06.2020 15:17:39 | 14,400 | 781e3dd3ea7a2c64aa0a80489d3e74bed113624a | [native] Preserve scroll position in message view when prepending new messages
Introducing `ChatList` component | [
{
"change_type": "MODIFY",
"old_path": "native/chat/message-list.react.js",
"new_path": "native/chat/message-list.react.js",
"diff": "@@ -17,12 +17,7 @@ import type { NavigationRoute } from '../navigation/route-names';\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\n-import {\n- View,\n- FlatList,\n- TouchableWithoutFeedback,\n- LayoutAnimation,\n-} from 'react-native';\n+import { View, TouchableWithoutFeedback } from 'react-native';\nimport _sum from 'lodash/fp/sum';\nimport _find from 'lodash/fp/find';\nimport { createSelector } from 'reselect';\n@@ -39,6 +34,7 @@ import {\nimport threadWatcher from 'lib/shared/thread-watcher';\nimport { threadInChatList } from 'lib/shared/thread-utils';\nimport { registerFetchKey } from 'lib/reducers/loading-reducer';\n+import ChatList from '../components/chat-list.react';\nimport {\nMessage,\n@@ -84,6 +80,7 @@ type Props = {|\ntype State = {|\nfocusedMessageKey: ?string,\nmessageListVerticalBounds: ?VerticalBounds,\n+ loadingFromScroll: boolean,\n|};\ntype PropsAndState = {|\n...Props,\n@@ -112,8 +109,8 @@ class MessageList extends React.PureComponent<Props, State> {\nstate = {\nfocusedMessageKey: null,\nmessageListVerticalBounds: null,\n+ loadingFromScroll: false,\n};\n- loadingFromScroll = false;\nflatListContainer: ?View;\nflatListExtraDataSelector = createSelector(\n@@ -187,12 +184,10 @@ class MessageList extends React.PureComponent<Props, State> {\nconst newListData = this.props.messageListData;\nconst oldListData = prevProps.messageListData;\nif (\n- this.loadingFromScroll &&\n+ this.state.loadingFromScroll &&\n(newListData.length > oldListData.length || this.props.startReached)\n) {\n- this.loadingFromScroll = false;\n- } else if (newListData.length > oldListData.length) {\n- LayoutAnimation.easeInEaseOut();\n+ this.setState({ loadingFromScroll: false });\n}\nconst modalIsOpen = MessageList.modalOpen(this.props);\n@@ -297,7 +292,8 @@ class MessageList extends React.PureComponent<Props, State> {\nref={this.flatListContainerRef}\nonLayout={this.onFlatListContainerLayout}\n>\n- <FlatList\n+ <ChatList\n+ loadingFromScroll={this.state.loadingFromScroll}\ninverted={true}\ndata={messageListData}\nrenderItem={this.renderItem}\n@@ -356,13 +352,13 @@ class MessageList extends React.PureComponent<Props, State> {\n}\nconst loader = _find({ key: 'loader' })(info.viewableItems);\n- if (!loader || this.loadingFromScroll) {\n+ if (!loader || this.state.loadingFromScroll) {\nreturn;\n}\nconst oldestMessageServerID = this.oldestMessageServerID();\nif (oldestMessageServerID) {\n- this.loadingFromScroll = true;\n+ this.setState({ loadingFromScroll: true });\nconst threadID = this.props.threadInfo.id;\nthis.props.dispatchActionPromise(\nfetchMessagesBeforeCursorActionTypes,\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "native/components/chat-list.react.js",
"diff": "+// @flow\n+\n+import type {\n+ Props as FlatListProps,\n+ DefaultProps as FlatListDefaultProps,\n+} from 'react-native/Libraries/Lists/FlatList';\n+\n+import * as React from 'react';\n+import { FlatList, LayoutAnimation } from 'react-native';\n+import invariant from 'invariant';\n+\n+type Props<T> = {\n+ ...React.Config<FlatListProps<T>, FlatListDefaultProps>,\n+ loadingFromScroll: boolean,\n+};\n+type State = {|\n+ pendingScrollAppend: boolean,\n+|};\n+class ChatList<T> extends React.PureComponent<Props<T>, State> {\n+ scrollPos = 0;\n+ scrollHeight: ?number;\n+ flatList: ?React.ElementRef<typeof FlatList>;\n+\n+ constructor(props: Props<T>) {\n+ super(props);\n+ this.state = {\n+ pendingScrollAppend: props.loadingFromScroll,\n+ };\n+ }\n+\n+ componentDidUpdate(prevProps: Props<T>) {\n+ if (this.props.loadingFromScroll && !prevProps.loadingFromScroll) {\n+ this.setState({ pendingScrollAppend: true });\n+ }\n+\n+ const itemsAdded =\n+ this.props.data &&\n+ (!prevProps.data || this.props.data.length > prevProps.data.length);\n+ if (itemsAdded && !this.state.pendingScrollAppend && this.scrollPos <= 0) {\n+ LayoutAnimation.easeInEaseOut();\n+ }\n+ }\n+\n+ render() {\n+ const { loadingFromScroll, ...rest } = this.props;\n+ return (\n+ <FlatList\n+ {...rest}\n+ ref={this.flatListRef}\n+ onScroll={this.onScroll}\n+ onContentSizeChange={this.onContentSizeChange}\n+ />\n+ );\n+ }\n+\n+ flatListRef = (flatList: ?React.ElementRef<typeof FlatList>) => {\n+ this.flatList = flatList;\n+ };\n+\n+ onScroll = (event: {\n+ nativeEvent: {\n+ contentOffset: { y: number },\n+ contentSize: { height: number },\n+ },\n+ }) => {\n+ this.scrollPos = event.nativeEvent.contentOffset.y;\n+ this.adjustScrollPos(event.nativeEvent.contentSize.height);\n+ // $FlowFixMe FlatList doesn't type ScrollView props\n+ this.props.onScroll && this.props.onScroll(event);\n+ };\n+\n+ onContentSizeChange = (contentWidth: number, contentHeight: number) => {\n+ this.adjustScrollPos(contentHeight);\n+ // $FlowFixMe FlatList doesn't type ScrollView props\n+ this.props.onContentSizeChange &&\n+ this.props.onContentSizeChange(contentWidth, contentHeight);\n+ };\n+\n+ adjustScrollPos(scrollHeight: number) {\n+ const oldScrollHeight = this.scrollHeight;\n+ this.scrollHeight = scrollHeight;\n+ if (\n+ oldScrollHeight === null ||\n+ oldScrollHeight === undefined ||\n+ scrollHeight === oldScrollHeight ||\n+ this.scrollPos <= 0\n+ ) {\n+ return;\n+ }\n+\n+ if (this.state.pendingScrollAppend) {\n+ this.setState({ pendingScrollAppend: false });\n+ return;\n+ }\n+\n+ const { flatList } = this;\n+ invariant(flatList, 'should be set');\n+\n+ const change = scrollHeight - oldScrollHeight;\n+ const newPos = this.scrollPos + change;\n+ flatList.scrollToOffset({ offset: newPos, animated: false });\n+ }\n+\n+ get scrolledToBottom() {\n+ const { scrollPos } = this;\n+ return scrollPos === null || scrollPos === undefined || scrollPos <= 0;\n+ }\n+}\n+\n+export default ChatList;\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Preserve scroll position in message view when prepending new messages
Introducing `ChatList` component |
129,187 | 07.06.2020 15:19:08 | 14,400 | 782581b422686925606f553650198920d1b9c286 | [native] Scroll message list to bottom when chat tab is pressed | [
{
"change_type": "MODIFY",
"old_path": "native/chat/message-list-container.react.js",
"new_path": "native/chat/message-list-container.react.js",
"diff": "@@ -9,7 +9,6 @@ import {\nmessageListRoutePropType,\nmessageListNavPropType,\n} from './message-list-types';\n-import type { TabNavigationProp } from '../navigation/app-navigator.react';\nimport type { ChatNavigationProp } from './chat.react';\nimport type { NavigationRoute } from '../navigation/route-names';\n@@ -103,28 +102,6 @@ class MessageListContainer extends React.PureComponent<Props, State> {\n};\n}\n- componentDidMount() {\n- const tabNavigation: ?TabNavigationProp<\n- 'Chat',\n- > = this.props.navigation.dangerouslyGetParent();\n- invariant(tabNavigation, 'ChatNavigator should be within TabNavigator');\n- tabNavigation.addListener('tabPress', this.onTabPress);\n- }\n-\n- componentWillUnmount() {\n- const tabNavigation: ?TabNavigationProp<\n- 'Chat',\n- > = this.props.navigation.dangerouslyGetParent();\n- invariant(tabNavigation, 'ChatNavigator should be within TabNavigator');\n- tabNavigation.removeListener('tabPress', this.onTabPress);\n- }\n-\n- onTabPress = () => {\n- if (this.props.navigation.isFocused()) {\n- this.props.navigation.popToTop();\n- }\n- };\n-\ntextToMeasureFromListData(listData: $ReadOnlyArray<ChatMessageItem>) {\nconst textToMeasure = [];\nfor (let item of listData) {\n"
},
{
"change_type": "MODIFY",
"old_path": "native/chat/message-list.react.js",
"new_path": "native/chat/message-list.react.js",
"diff": "@@ -294,6 +294,7 @@ class MessageList extends React.PureComponent<Props, State> {\n>\n<ChatList\nloadingFromScroll={this.state.loadingFromScroll}\n+ navigation={this.props.navigation}\ninverted={true}\ndata={messageListData}\nrenderItem={this.renderItem}\n"
},
{
"change_type": "MODIFY",
"old_path": "native/components/chat-list.react.js",
"new_path": "native/components/chat-list.react.js",
"diff": "@@ -4,6 +4,8 @@ import type {\nProps as FlatListProps,\nDefaultProps as FlatListDefaultProps,\n} from 'react-native/Libraries/Lists/FlatList';\n+import type { ChatNavigationProp } from '../chat/chat.react';\n+import type { TabNavigationProp } from '../navigation/app-navigator.react';\nimport * as React from 'react';\nimport { FlatList, LayoutAnimation } from 'react-native';\n@@ -11,6 +13,7 @@ import invariant from 'invariant';\ntype Props<T> = {\n...React.Config<FlatListProps<T>, FlatListDefaultProps>,\n+ navigation: ChatNavigationProp<'MessageList'>,\nloadingFromScroll: boolean,\n};\ntype State = {|\n@@ -28,6 +31,34 @@ class ChatList<T> extends React.PureComponent<Props<T>, State> {\n};\n}\n+ componentDidMount() {\n+ const tabNavigation: ?TabNavigationProp<\n+ 'Chat',\n+ > = this.props.navigation.dangerouslyGetParent();\n+ invariant(tabNavigation, 'ChatNavigator should be within TabNavigator');\n+ tabNavigation.addListener('tabPress', this.onTabPress);\n+ }\n+\n+ componentWillUnmount() {\n+ const tabNavigation: ?TabNavigationProp<\n+ 'Chat',\n+ > = this.props.navigation.dangerouslyGetParent();\n+ invariant(tabNavigation, 'ChatNavigator should be within TabNavigator');\n+ tabNavigation.removeListener('tabPress', this.onTabPress);\n+ }\n+\n+ onTabPress = () => {\n+ const { flatList } = this;\n+ if (!this.props.navigation.isFocused() || !flatList) {\n+ return;\n+ }\n+ if (this.scrollPos > 0) {\n+ flatList.scrollToOffset({ offset: 0 });\n+ } else {\n+ this.props.navigation.popToTop();\n+ }\n+ };\n+\ncomponentDidUpdate(prevProps: Props<T>) {\nif (this.props.loadingFromScroll && !prevProps.loadingFromScroll) {\nthis.setState({ pendingScrollAppend: true });\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Scroll message list to bottom when chat tab is pressed |
129,187 | 07.06.2020 15:20:21 | 14,400 | 1eabebc6aa62f56b661a4e16d0e113cdcc076861 | [native] Hide errors from calling preventAutoHideAsync multiple times
This occurs when refreshing in dev mode | [
{
"change_type": "MODIFY",
"old_path": "native/navigation/app-navigator.react.js",
"new_path": "native/navigation/app-navigator.react.js",
"diff": "@@ -10,8 +10,12 @@ import { PersistGate } from 'redux-persist/integration/react';\nimport * as SplashScreen from 'expo-splash-screen';\nimport Icon from 'react-native-vector-icons/FontAwesome';\n-SplashScreen.preventAutoHideAsync();\nlet splashScreenHasHidden = false;\n+(async () => {\n+ try {\n+ await SplashScreen.preventAutoHideAsync();\n+ } catch {}\n+})();\nimport {\nCalendarRouteName,\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Hide errors from calling preventAutoHideAsync multiple times
This occurs when refreshing in dev mode |
129,187 | 08.06.2020 09:48:46 | 14,400 | 5156a8bc7381762e23fbec54fe85819ebd1e3f66 | [native] Move ChatList to chat folder | [
{
"change_type": "RENAME",
"old_path": "native/components/chat-list.react.js",
"new_path": "native/chat/chat-list.react.js",
"diff": "@@ -4,7 +4,7 @@ import type {\nProps as FlatListProps,\nDefaultProps as FlatListDefaultProps,\n} from 'react-native/Libraries/Lists/FlatList';\n-import type { ChatNavigationProp } from '../chat/chat.react';\n+import type { ChatNavigationProp } from './chat.react';\nimport type { TabNavigationProp } from '../navigation/app-navigator.react';\nimport * as React from 'react';\n"
},
{
"change_type": "MODIFY",
"old_path": "native/chat/message-list.react.js",
"new_path": "native/chat/message-list.react.js",
"diff": "@@ -34,7 +34,7 @@ import {\nimport threadWatcher from 'lib/shared/thread-watcher';\nimport { threadInChatList } from 'lib/shared/thread-utils';\nimport { registerFetchKey } from 'lib/reducers/loading-reducer';\n-import ChatList from '../components/chat-list.react';\n+import ChatList from './chat-list.react';\nimport {\nMessage,\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Move ChatList to chat folder |
129,187 | 08.06.2020 12:27:33 | 14,400 | a1581642bee3e919cdff7521806251c82abe4cca | [native] Allow one overlay to dismiss while another appears | [
{
"change_type": "MODIFY",
"old_path": "native/media/camera-modal.react.js",
"new_path": "native/media/camera-modal.react.js",
"diff": "@@ -282,7 +282,6 @@ class CameraModal extends React.PureComponent<Props, State> {\npinchHandler = React.createRef();\ntapEvent;\ntapHandler = React.createRef();\n- navigationProgress: Value;\nanimationCode: Value;\ncloseButton: ?React.ElementRef<TouchableOpacityInstance>;\n@@ -336,15 +335,6 @@ class CameraModal extends React.PureComponent<Props, State> {\npendingPhotoCapture: undefined,\n};\n- const { overlayContext } = props;\n- invariant(overlayContext, 'CameraModal should have OverlayContext');\n- const { position, routeIndex } = overlayContext;\n- this.navigationProgress = interpolate(position, {\n- inputRange: [routeIndex - 1, routeIndex],\n- outputRange: [0, 1],\n- extrapolate: Extrapolate.CLAMP,\n- });\n-\nconst sendButtonScale = interpolate(this.sendButtonProgress, {\ninputRange: [0, 1],\noutputRange: [1.1, 1],\n@@ -609,9 +599,11 @@ class CameraModal extends React.PureComponent<Props, State> {\n}\nget containerStyle() {\n+ const { overlayContext } = this.props;\n+ invariant(overlayContext, 'CameraModal should have OverlayContext');\nreturn {\n...styles.container,\n- opacity: this.navigationProgress,\n+ opacity: overlayContext.position,\n};\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "native/media/multimedia-modal.react.js",
"new_path": "native/media/multimedia-modal.react.js",
"diff": "@@ -296,12 +296,7 @@ class MultimediaModal extends React.PureComponent<Props, State> {\nconst { overlayContext } = props;\ninvariant(overlayContext, 'MultimediaModal should have OverlayContext');\n- const { position, routeIndex } = overlayContext;\n- const navigationProgress = interpolate(position, {\n- inputRange: [routeIndex - 1, routeIndex],\n- outputRange: [0, 1],\n- extrapolate: Extrapolate.CLAMP,\n- });\n+ const navigationProgress = overlayContext.position;\n// The inputs we receive from PanGestureHandler\nconst panState = new Value(-1);\n"
},
{
"change_type": "MODIFY",
"old_path": "native/navigation/action-result-modal.react.js",
"new_path": "native/navigation/action-result-modal.react.js",
"diff": "@@ -12,10 +12,6 @@ import { contentBottomOffset } from '../selectors/dimension-selectors';\nimport { useOverlayStyles } from '../themes/colors';\nimport { OverlayContext } from './overlay-context';\n-/* eslint-disable import/no-named-as-default-member */\n-const { Extrapolate, interpolate } = Animated;\n-/* eslint-enable import/no-named-as-default-member */\n-\nexport type ActionResultModalParams = {|\nmessage: string,\npreventPresses: true,\n@@ -28,16 +24,7 @@ type Props = {|\nfunction ActionResultModal(props: Props) {\nconst overlayContext = React.useContext(OverlayContext);\ninvariant(overlayContext, 'ActionResultModal should have OverlayContext');\n- const { position, routeIndex } = overlayContext;\n- const progress = React.useMemo(\n- () =>\n- interpolate(position, {\n- inputRange: [routeIndex - 1, routeIndex],\n- outputRange: [0, 1],\n- extrapolate: Extrapolate.CLAMP,\n- }),\n- [position, routeIndex],\n- );\n+ const { position } = overlayContext;\n// Timer resets whenever message updates\nconst { goBackOnce } = props.navigation;\n@@ -50,7 +37,7 @@ function ActionResultModal(props: Props) {\nconst styles = useOverlayStyles(ourStyles);\nconst containerStyle = {\n...styles.container,\n- opacity: progress,\n+ opacity: position,\n};\nreturn (\n<Animated.View style={containerStyle}>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/navigation/overlay-context.js",
"new_path": "native/navigation/overlay-context.js",
"diff": "@@ -8,7 +8,6 @@ type ScrollBlockingModalStatus = 'open' | 'closed' | 'closing';\nexport type OverlayContextType = {|\nposition: Animated.Value,\nisDismissing: boolean,\n- routeIndex: number,\nscrollBlockingModalStatus: ScrollBlockingModalStatus,\nsetScrollBlockingModalStatus: ScrollBlockingModalStatus => void,\n|};\n@@ -20,7 +19,6 @@ const overlayContextPropType = PropTypes.shape({\n// eslint-disable-next-line import/no-named-as-default-member\nposition: PropTypes.instanceOf(Animated.Value).isRequired,\nisDismissing: PropTypes.bool.isRequired,\n- routeIndex: PropTypes.number.isRequired,\nscrollBlockingModalStatus: PropTypes.oneOf(['open', 'closed', 'closing'])\n.isRequired,\nsetScrollBlockingModalStatus: PropTypes.func.isRequired,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/navigation/overlay-navigator.react.js",
"new_path": "native/navigation/overlay-navigator.react.js",
"diff": "@@ -40,11 +40,14 @@ const OverlayNavigator = React.memo<Props>(\n);\nconst curIndex = state.index;\n- const positionRef = React.useRef();\n- if (!positionRef.current) {\n- positionRef.current = new Value(curIndex);\n- }\n- const position = positionRef.current;\n+ const positionRefs = React.useRef({});\n+ const positions = positionRefs.current;\n+\n+ const firstRenderRef = React.useRef(true);\n+ React.useEffect(() => {\n+ firstRenderRef.current = false;\n+ }, [firstRenderRef]);\n+ const firstRender = firstRenderRef.current;\nconst { routes } = state;\nconst scenes = React.useMemo(\n@@ -55,12 +58,17 @@ const OverlayNavigator = React.memo<Props>(\ndescriptor,\n`OverlayNavigator could not find descriptor for ${route.key}`,\n);\n+ if (!positions[route.key]) {\n+ positions[route.key] = new Value(firstRender ? 1 : 0);\n+ }\nreturn {\nroute,\ndescriptor,\ncontext: {\n- position,\n+ position: positions[route.key],\nisDismissing: curIndex < routeIndex,\n+ },\n+ ordering: {\nrouteIndex,\n},\n};\n@@ -69,17 +77,17 @@ const OverlayNavigator = React.memo<Props>(\n// render. We know that they should only substantially change if something\n// about the underlying route has changed\n// eslint-disable-next-line react-hooks/exhaustive-deps\n- [position, routes, curIndex],\n+ [positions, routes, curIndex],\n);\nconst prevScenesRef = React.useRef();\nconst prevScenes = prevScenesRef.current;\n// The scrollBlockingModalStatus state gets incorporated into the\n- // OverlayContext, but it's global to the navigator rather than local to each\n- // screen. Note that we also include the setter in OverlayContext. We do this\n- // so that screens can freeze ScrollViews as quickly as possible to avoid\n- // drags after onLongPress is triggered\n+ // OverlayContext, but it's global to the navigator rather than local to\n+ // each screen. Note that we also include the setter in OverlayContext. We\n+ // do this so that screens can freeze ScrollViews as quickly as possible to\n+ // avoid drags after onLongPress is triggered\nconst getScrollBlockingModalStatus = data => {\nlet status = 'closed';\nfor (let scene of data) {\n@@ -105,14 +113,18 @@ const OverlayNavigator = React.memo<Props>(\nscrollBlockingModalStatus,\nsetScrollBlockingModalStatus,\n},\n+ ordering: {\n+ ...scene.ordering,\n+ creationTime: Date.now(),\n+ },\nlisteners: [],\n});\n- // We track two previous states of scrollBlockingModalStatus via refs. We need\n- // two because we expose setScrollBlockingModalStatus to screens. We track the\n- // previous sceneData-determined value separately so that we only overwrite\n- // the screen-determined value with the sceneData-determined value when the\n- // latter actually changes\n+ // We track two previous states of scrollBlockingModalStatus via refs. We\n+ // need two because we expose setScrollBlockingModalStatus to screens. We\n+ // track the previous sceneData-determined value separately so that we only\n+ // overwrite the screen-determined value with the sceneData-determined value\n+ // when the latter actually changes\nconst prevScrollBlockingModalStatusRef = React.useRef(\nscrollBlockingModalStatus,\n);\n@@ -136,10 +148,17 @@ const OverlayNavigator = React.memo<Props>(\nconst prevSceneDataRef = React.useRef(sceneData);\nconst prevSceneData = prevSceneDataRef.current;\n- // We need to initiate animations in useEffect blocks, but because we setState\n- // within render we might have multiple renders before the useEffect triggers.\n- // So we cache whether or not a new animation should be started in this ref\n- const pendingAnimationRef = React.useRef(false);\n+ // We need to initiate animations in useEffect blocks, but because we\n+ // setState within render we might have multiple renders before the\n+ // useEffect triggers. So we cache whether or not new animations should be\n+ // started in this ref\n+ const pendingAnimationsRef = React.useRef<{ [key: string]: number }>({});\n+ const queueAnimation = (key: string, toValue: number) => {\n+ pendingAnimationsRef.current = {\n+ ...pendingAnimationsRef.current,\n+ [key]: toValue,\n+ };\n+ };\n// This block keeps sceneData updated when our props change. It's the\n// hook equivalent of getDerivedStateFromProps\n@@ -147,7 +166,6 @@ const OverlayNavigator = React.memo<Props>(\nconst updatedSceneData = { ...sceneData };\nlet sceneDataChanged = false;\nif (prevScenes && scenes !== prevScenes) {\n- let sceneAdded = false;\nconst currentKeys = new Set();\nfor (let scene of scenes) {\nconst { key } = scene.route;\n@@ -158,7 +176,7 @@ const OverlayNavigator = React.memo<Props>(\n// A new route has been pushed\nupdatedSceneData[key] = sceneDataForNewScene(scene);\nsceneDataChanged = true;\n- sceneAdded = true;\n+ queueAnimation(key, 1);\ncontinue;\n}\n@@ -177,10 +195,13 @@ const OverlayNavigator = React.memo<Props>(\n}\nif (\nscene.context.position !== data.context.position ||\n- scene.context.isDismissing !== data.context.isDismissing ||\n- scene.context.routeIndex !== data.context.routeIndex\n+ scene.context.isDismissing !== data.context.isDismissing\n) {\n- data = { ...data, context: scene.context };\n+ data = { ...data, context: { ...data.context, ...scene.context } };\n+ dataChanged = true;\n+ }\n+ if (scene.ordering.routeIndex !== data.ordering.routeIndex) {\n+ data = { ...data, ordering: { ...data.ordering, ...scene.ordering } };\ndataChanged = true;\n}\n@@ -191,10 +212,6 @@ const OverlayNavigator = React.memo<Props>(\n}\n}\n- let dismissingSceneData;\n- if (!sceneAdded) {\n- // We only consider a fresh dismissal if no scene has been added because\n- // pushing a new route wipes out any dismissals\nfor (let i = 0; i < prevScenes.length; i++) {\nconst scene = prevScenes[i];\nconst { key } = scene.route;\n@@ -204,9 +221,12 @@ const OverlayNavigator = React.memo<Props>(\ncurrentKeys.add(key);\nconst data = updatedSceneData[key];\ninvariant(data, `should have sceneData for dismissed key ${key}`);\n+\n// A route just got dismissed\n// We'll watch the animation to determine when to clear the screen\n- dismissingSceneData = {\n+ const { position } = data.context;\n+ invariant(position, `should have position for dismissed key ${key}`);\n+ updatedSceneData[key] = {\n...data,\ncontext: {\n...data.context,\n@@ -214,7 +234,7 @@ const OverlayNavigator = React.memo<Props>(\n},\nlisteners: [\ncond(\n- lessOrEq(position, i - 1),\n+ lessOrEq(position, 0),\ncall([], () =>\nsetSceneData(curSceneData => {\nconst newSceneData = { ...curSceneData };\n@@ -225,47 +245,28 @@ const OverlayNavigator = React.memo<Props>(\n),\n],\n};\n- updatedSceneData[key] = dismissingSceneData;\nsceneDataChanged = true;\n- break;\n- }\n+ queueAnimation(key, 0);\n}\n-\n- if (sceneAdded || dismissingSceneData) {\n- // We start an animation whenever a scene is added or dismissed\n- pendingAnimationRef.current = true;\n}\n- // We want to keep at most one dismissing scene in the sceneData at a time\n- for (let key in updatedSceneData) {\n- if (currentKeys.has(key)) {\n- continue;\n- }\n- const data = updatedSceneData[key];\n- if (!sceneAdded && !dismissingSceneData && data.listeners.length > 0) {\n- dismissingSceneData = data;\n- } else {\n- // A route has just gotten cleared. This can occur if multiple routes\n- // are popped off at once, or if the user pops two routes in rapid\n- // succession\n- delete updatedSceneData[key];\n- sceneDataChanged = true;\n- }\n- }\n- }\n-\n- const startAnimation = pendingAnimationRef.current;\n+ const pendingAnimations = pendingAnimationsRef.current;\nReact.useEffect(() => {\n- if (!startAnimation) {\n+ if (Object.keys(pendingAnimations).length === 0) {\nreturn;\n}\n- pendingAnimationRef.current = false;\n+ for (let key in pendingAnimations) {\n+ const toValue = pendingAnimations[key];\n+ const position = positions[key];\n+ invariant(position, `should have position for animating key ${key}`);\ntiming(position, {\nduration: 250,\neasing: Easing.inOut(Easing.ease),\n- toValue: curIndex,\n+ toValue,\n}).start();\n- }, [position, startAnimation, curIndex]);\n+ }\n+ pendingAnimationsRef.current = {};\n+ }, [positions, pendingAnimations]);\n// If sceneData changes, we update scrollBlockingModalStatus based on it, both\n// in state and within the individual sceneData contexts. If sceneData doesn't\n@@ -321,9 +322,14 @@ const OverlayNavigator = React.memo<Props>(\n? newScrollBlockingModalStatus\n: scrollBlockingModalStatus;\n- const sceneList = values(updatedSceneData).sort(\n- (a, b) => a.context.routeIndex - b.context.routeIndex,\n- );\n+ const sceneList = values(updatedSceneData).sort((a, b) => {\n+ const routeIndexDifference =\n+ a.ordering.routeIndex - b.ordering.routeIndex;\n+ if (routeIndexDifference) {\n+ return routeIndexDifference;\n+ }\n+ return a.ordering.creationTime - b.ordering.creationTime;\n+ });\nconst screens = [];\nlet pressableSceneAssigned = false,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/navigation/tooltip.react.js",
"new_path": "native/navigation/tooltip.react.js",
"diff": "@@ -131,7 +131,6 @@ function createTooltip<\ndispatchActionPromise: PropTypes.func.isRequired,\noverlayContext: overlayContextPropType,\n};\n- progress: Value;\nbackdropOpacity: Value;\ntooltipContainerOpacity: Value;\ntooltipVerticalAbove: Value;\n@@ -144,38 +143,33 @@ function createTooltip<\nconst { overlayContext } = props;\ninvariant(overlayContext, 'Tooltip should have OverlayContext');\n- const { position, routeIndex } = overlayContext;\n+ const { position } = overlayContext;\n- this.progress = interpolate(position, {\n- inputRange: [routeIndex - 1, routeIndex],\n- outputRange: [0, 1],\n- extrapolate: Extrapolate.CLAMP,\n- });\n- this.backdropOpacity = interpolate(this.progress, {\n+ this.backdropOpacity = interpolate(position, {\ninputRange: [0, 1],\noutputRange: [0, 0.7],\nextrapolate: Extrapolate.CLAMP,\n});\n- this.tooltipContainerOpacity = interpolate(this.progress, {\n+ this.tooltipContainerOpacity = interpolate(position, {\ninputRange: [0, 0.1],\noutputRange: [0, 1],\nextrapolate: Extrapolate.CLAMP,\n});\nconst { margin } = this;\n- this.tooltipVerticalAbove = interpolate(this.progress, {\n+ this.tooltipVerticalAbove = interpolate(position, {\ninputRange: [0, 1],\noutputRange: [margin + this.tooltipHeight / 2, 0],\nextrapolate: Extrapolate.CLAMP,\n});\n- this.tooltipVerticalBelow = interpolate(this.progress, {\n+ this.tooltipVerticalBelow = interpolate(position, {\ninputRange: [0, 1],\noutputRange: [-margin - this.tooltipHeight / 2, 0],\nextrapolate: Extrapolate.CLAMP,\n});\nthis.tooltipHorizontal = multiply(\n- add(1, multiply(-1, this.progress)),\n+ add(1, multiply(-1, position)),\nthis.tooltipHorizontalOffset,\n);\n}\n@@ -293,7 +287,12 @@ function createTooltip<\nmargin;\nstyle.transform.push({ translateY: this.tooltipVerticalBelow });\n}\n- style.transform.push({ scale: this.progress });\n+\n+ const { overlayContext } = this.props;\n+ invariant(overlayContext, 'Tooltip should have OverlayContext');\n+ const { position } = overlayContext;\n+ style.transform.push({ scale: position });\n+\nreturn style;\n}\n@@ -340,6 +339,10 @@ function createTooltip<\ntriangleUp = <View style={[styles.triangleUp, triangleStyle]} />;\n}\n+ const { overlayContext } = this.props;\n+ invariant(overlayContext, 'Tooltip should have OverlayContext');\n+ const { position } = overlayContext;\n+\nreturn (\n<TouchableWithoutFeedback onPress={this.onPressBackdrop}>\n<View style={styles.container}>\n@@ -349,7 +352,7 @@ function createTooltip<\n<ButtonComponent\nnavigation={navigation}\nroute={route}\n- progress={this.progress}\n+ progress={position}\n/>\n</View>\n</View>\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Allow one overlay to dismiss while another appears |
129,187 | 08.06.2020 12:39:52 | 14,400 | 7d235a2475f26abeab0a6de28a8b6df2a1ec4868 | [server] Don't delete open subthreads, even if they have no members | [
{
"change_type": "MODIFY",
"old_path": "server/src/deleters/thread-deleters.js",
"new_path": "server/src/deleters/thread-deleters.js",
"diff": "// @flow\n-import type {\n- ThreadDeletionRequest,\n- LeaveThreadResult,\n+import {\n+ type ThreadDeletionRequest,\n+ type LeaveThreadResult,\n+ threadTypes,\n+ threadPermissions,\n} from 'lib/types/thread-types';\nimport type { Viewer } from '../session/viewer';\nimport { updateTypes } from 'lib/types/update-types';\n@@ -10,7 +12,6 @@ import { updateTypes } from 'lib/types/update-types';\nimport bcrypt from 'twin-bcrypt';\nimport { ServerError } from 'lib/utils/errors';\n-import { threadPermissions } from 'lib/types/thread-types';\nimport { permissionLookup } from 'lib/permissions/thread-permissions';\nimport { dbQuery, SQL } from '../database';\n@@ -130,6 +131,10 @@ async function deleteThread(\n}\nasync function deleteInaccessibleThreads(): Promise<void> {\n+ // A thread is considered \"inaccessible\" if it has no members and either has\n+ // no parent or is a \"secret\" thread. In orgs where admins can see \"secret\"\n+ // threads, an \"inaccessible\" thread may technically be accessible by an\n+ // admin, but we will delete it anyways\nawait dbQuery(SQL`\nDELETE t, i, d, id, e, ie, re, ire, r, ir, ms, im, up, iu, f, n, ino\nFROM threads t\n@@ -150,7 +155,8 @@ async function deleteInaccessibleThreads(): Promise<void> {\nLEFT JOIN focused f ON f.thread = t.id\nLEFT JOIN notifications n ON n.thread = t.id\nLEFT JOIN ids ino ON ino.id = n.id\n- WHERE m.thread IS NULL\n+ WHERE m.thread IS NULL AND\n+ (t.parent_thread_id IS NULL OR t.type = ${threadTypes.CHAT_SECRET})\n`);\n}\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [server] Don't delete open subthreads, even if they have no members |
129,187 | 08.06.2020 13:30:14 | 14,400 | eca21739b89700716be34028249c2914474b0d52 | [server] Make loader.mjs handle force-ESM in a more generic way | [
{
"change_type": "MODIFY",
"old_path": "server/loader.mjs",
"new_path": "server/loader.mjs",
"diff": "@@ -3,6 +3,16 @@ import { promisify } from 'util';\nconst readFile = promisify(fs.readFile);\n+// We prefer to resolve packages as modules.\n+// (1) It allows us to do destructuring imports in Node\n+// (2) Sometimes a CJS module won't specify a default export, in which case\n+// Node won't allow a default import either. This prevents all imports\n+// (3) Sometimes Flow libdefs don't specify a default export\n+const forceResolveAsModule = {\n+ 'reselect': 'module',\n+ 'redux': 'module',\n+};\n+\nasync function resolve(\nspecifier,\ncontext,\n@@ -19,19 +29,17 @@ async function resolve(\nreturn { url };\n}\n- // We prefer to resolve packages as modules so that Node allows us to do\n- // destructuring imports, as sometimes Flow libdefs don't specify a default\n- // export. defaultResolve doesn't look at the module property in package.json,\n- // so we do it manually here\n- if (specifier === 'reselect' || specifier === 'redux') {\n+ const forceModuleKey = forceResolveAsModule[specifier];\n+ if (forceModuleKey) {\nconst moduleFolder = defaultResult.url.match(\nnew RegExp(`file://(.*node_modules\\/${specifier})`),\n)[1];\nconst packageConfig = await readFile(`${moduleFolder}/package.json`);\nconst packageJSON = JSON.parse(packageConfig);\n- if (packageJSON.module) {\n+ const pathToModule = packageJSON[forceModuleKey];\n+ if (pathToModule) {\nreturn {\n- url: `file://${moduleFolder}/${packageJSON.module}`,\n+ url: `file://${moduleFolder}/${pathToModule}`,\n};\n}\n}\n@@ -44,12 +52,11 @@ async function getFormat(\ncontext,\ndefaultGetFormat,\n) {\n- if (\n- url.indexOf(\"node_modules/reselect\") >= 0 ||\n- url.indexOf(\"node_modules/redux\") >= 0\n- ) {\n+ for (let packageName in forceResolveAsModule) {\n+ if (url.indexOf(`node_modules/${packageName}`) >= 0) {\nreturn { format: 'module' };\n}\n+ }\nreturn defaultGetFormat(url, context, defaultGetFormat);\n}\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [server] Make loader.mjs handle force-ESM in a more generic way |
129,187 | 08.06.2020 14:02:15 | 14,400 | 0778467e3b2759e1a4bd0c045f0c0ea5e73543cd | Use reselect-map to memoize individual Redux-stored objects
This should be a pretty significant perf improvement! | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "lib/flow-typed/npm/reselect-map_vx.x.x.js",
"diff": "+// flow-typed signature: e78639f800704ce30556eab64065fedb\n+// flow-typed version: <<STUB>>/reselect-map_v1.0.5/flow_v0.105.0\n+\n+/**\n+ * This is an autogenerated libdef stub for:\n+ *\n+ * 'reselect-map'\n+ *\n+ * Fill this stub out by replacing all the `any` types.\n+ *\n+ * Once filled out, we encourage you to share your work with the\n+ * community by sending a pull request to:\n+ * https://github.com/flowtype/flow-typed\n+ */\n+\n+declare module 'reselect-map' {\n+ declare module.exports: any;\n+}\n+\n+/**\n+ * We include stubs for each file inside this npm package in case you need to\n+ * require those files directly. Feel free to delete any files that aren't\n+ * needed.\n+ */\n+declare module 'reselect-map/lib' {\n+ declare module.exports: any;\n+}\n+\n+declare module 'reselect-map/lib/memoize' {\n+ declare module.exports: any;\n+}\n+\n+declare module 'reselect-map/src' {\n+ declare module.exports: any;\n+}\n+\n+declare module 'reselect-map/src/memoize' {\n+ declare module.exports: any;\n+}\n+\n+// Filename aliases\n+declare module 'reselect-map/lib/index' {\n+ declare module.exports: $Exports<'reselect-map/lib'>;\n+}\n+declare module 'reselect-map/lib/index.js' {\n+ declare module.exports: $Exports<'reselect-map/lib'>;\n+}\n+declare module 'reselect-map/lib/memoize.js' {\n+ declare module.exports: $Exports<'reselect-map/lib/memoize'>;\n+}\n+declare module 'reselect-map/src/index' {\n+ declare module.exports: $Exports<'reselect-map/src'>;\n+}\n+declare module 'reselect-map/src/index.js' {\n+ declare module.exports: $Exports<'reselect-map/src'>;\n+}\n+declare module 'reselect-map/src/memoize.js' {\n+ declare module.exports: $Exports<'reselect-map/src/memoize'>;\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "lib/package.json",
"new_path": "lib/package.json",
"diff": "\"react\": \"16.9.0\",\n\"react-redux\": \"^7.1.1\",\n\"reselect\": \"^4.0.0\",\n+ \"reselect-map\": \"^1.0.5\",\n\"string-hash\": \"^1.1.3\",\n\"tinycolor2\": \"^1.4.1\",\n\"tokenize-text\": \"^1.1.3\",\n"
},
{
"change_type": "MODIFY",
"old_path": "lib/selectors/chat-selectors.js",
"new_path": "lib/selectors/chat-selectors.js",
"diff": "@@ -13,9 +13,9 @@ import {\nmessageTypes,\nisComposableMessageType,\n} from '../types/message-types';\n-import type { UserInfo } from '../types/user-types';\nimport { createSelector } from 'reselect';\n+import { createObjectSelector } from 'reselect-map';\nimport PropTypes from 'prop-types';\nimport invariant from 'invariant';\nimport _flow from 'lodash/fp/flow';\n@@ -45,12 +45,20 @@ const chatThreadItemPropType = PropTypes.shape({\nlastUpdatedTime: PropTypes.number.isRequired,\n});\n+const messageInfoSelector: (\n+ state: BaseAppState<*>,\n+) => { [id: string]: MessageInfo } = createObjectSelector(\n+ (state: BaseAppState<*>) => state.messageStore.messages,\n+ (state: BaseAppState<*>) => state.currentUserInfo && state.currentUserInfo.id,\n+ (state: BaseAppState<*>) => state.userInfos,\n+ threadInfoSelector,\n+ createMessageInfo,\n+);\n+\nfunction createChatThreadItem(\nthreadInfo: ThreadInfo,\n- threadInfos: { [id: string]: ThreadInfo },\nmessageStore: MessageStore,\n- viewerID: ?string,\n- userInfos: { [id: string]: UserInfo },\n+ messages: { [id: string]: MessageInfo },\n): ChatThreadItem {\nconst thread = messageStore.threads[threadInfo.id];\nif (!thread || thread.messageIDs.length === 0) {\n@@ -62,13 +70,7 @@ function createChatThreadItem(\n}\nlet mostRecentMessageInfo = undefined;\nfor (let messageID of thread.messageIDs) {\n- const mostRecentRawMessageInfo = messageStore.messages[messageID];\n- mostRecentMessageInfo = createMessageInfo(\n- mostRecentRawMessageInfo,\n- viewerID,\n- userInfos,\n- threadInfos,\n- );\n+ mostRecentMessageInfo = messages[messageID];\nif (mostRecentMessageInfo) {\nbreak;\n}\n@@ -93,24 +95,16 @@ const chatListData: (\n) => ChatThreadItem[] = createSelector(\nthreadInfoSelector,\n(state: BaseAppState<*>) => state.messageStore,\n- (state: BaseAppState<*>) => state.currentUserInfo && state.currentUserInfo.id,\n- (state: BaseAppState<*>) => state.userInfos,\n+ messageInfoSelector,\n(\nthreadInfos: { [id: string]: ThreadInfo },\nmessageStore: MessageStore,\n- viewerID: ?string,\n- userInfos: { [id: string]: UserInfo },\n+ messageInfos: { [id: string]: MessageInfo },\n): ChatThreadItem[] =>\n_flow(\n_filter(threadInChatList),\n_map((threadInfo: ThreadInfo): ChatThreadItem =>\n- createChatThreadItem(\n- threadInfo,\n- threadInfos,\n- messageStore,\n- viewerID,\n- userInfos,\n- ),\n+ createChatThreadItem(threadInfo, messageStore, messageInfos),\n),\n_orderBy('lastUpdatedTime')('desc'),\n)(threadInfos),\n@@ -153,32 +147,31 @@ const msInFiveMinutes = 5 * 60 * 1000;\nfunction createChatMessageItems(\nthreadID: string,\nmessageStore: MessageStore,\n- viewerID: ?string,\n- userInfos: { [id: string]: UserInfo },\n+ messageInfos: { [id: string]: MessageInfo },\nthreadInfos: { [id: string]: ThreadInfo },\n): ChatMessageItem[] {\nconst thread = messageStore.threads[threadID];\nif (!thread) {\nreturn [];\n}\n- const rawMessageInfos = thread.messageIDs\n- .map((messageID: string) => messageStore.messages[messageID])\n+ const threadMessageInfos = thread.messageIDs\n+ .map((messageID: string) => messageInfos[messageID])\n.filter(Boolean);\nconst chatMessageItems = [];\nlet lastMessageInfo = null;\n- for (let i = rawMessageInfos.length - 1; i >= 0; i--) {\n- const rawMessageInfo = rawMessageInfos[i];\n+ for (let i = threadMessageInfos.length - 1; i >= 0; i--) {\n+ const messageInfo = threadMessageInfos[i];\nlet startsConversation = true;\nlet startsCluster = true;\nif (\nlastMessageInfo &&\n- lastMessageInfo.time + msInFiveMinutes > rawMessageInfo.time\n+ lastMessageInfo.time + msInFiveMinutes > messageInfo.time\n) {\nstartsConversation = false;\nif (\nisComposableMessageType(lastMessageInfo.type) &&\n- isComposableMessageType(rawMessageInfo.type) &&\n- lastMessageInfo.creatorID === rawMessageInfo.creatorID\n+ isComposableMessageType(messageInfo.type) &&\n+ lastMessageInfo.creator.id === messageInfo.creator.id\n) {\nstartsCluster = false;\n}\n@@ -188,15 +181,6 @@ function createChatMessageItems(\ninvariant(lastMessageItem.itemType === 'message', 'should be message');\nlastMessageItem.endsCluster = true;\n}\n- const messageInfo = createMessageInfo(\n- rawMessageInfo,\n- viewerID,\n- userInfos,\n- threadInfos,\n- );\n- if (!messageInfo) {\n- continue;\n- }\nif (isComposableMessageType(messageInfo.type)) {\n// We use these invariants instead of just checking the messageInfo.type\n// directly in the conditional above so that isComposableMessageType can\n@@ -236,7 +220,7 @@ function createChatMessageItems(\nrobotext,\n});\n}\n- lastMessageInfo = rawMessageInfo;\n+ lastMessageInfo = messageInfo;\n}\nif (chatMessageItems.length > 0) {\nconst lastMessageItem = chatMessageItems[chatMessageItems.length - 1];\n@@ -253,23 +237,14 @@ function createChatMessageItems(\nconst baseMessageListData = (threadID: string) =>\ncreateSelector(\n(state: BaseAppState<*>) => state.messageStore,\n- (state: BaseAppState<*>) =>\n- state.currentUserInfo && state.currentUserInfo.id,\n- (state: BaseAppState<*>) => state.userInfos,\n+ messageInfoSelector,\nthreadInfoSelector,\n(\nmessageStore: MessageStore,\n- viewerID: ?string,\n- userInfos: { [id: string]: UserInfo },\n+ messageInfos: { [id: string]: MessageInfo },\nthreadInfos: { [id: string]: ThreadInfo },\n): ChatMessageItem[] =>\n- createChatMessageItems(\n- threadID,\n- messageStore,\n- viewerID,\n- userInfos,\n- threadInfos,\n- ),\n+ createChatMessageItems(threadID, messageStore, messageInfos, threadInfos),\n);\nconst messageListData: (\nthreadID: string,\n@@ -278,6 +253,7 @@ const messageListData: (\n);\nexport {\n+ messageInfoSelector,\ncreateChatThreadItem,\nchatThreadItemPropType,\nchatListData,\n"
},
{
"change_type": "MODIFY",
"old_path": "lib/selectors/thread-selectors.js",
"new_path": "lib/selectors/thread-selectors.js",
"diff": "@@ -7,11 +7,11 @@ import {\ntype RelativeMemberInfo,\nthreadPermissions,\n} from '../types/thread-types';\n-import type { RawEntryInfo, EntryInfo } from '../types/entry-types';\n-import type { UserInfo } from '../types/user-types';\n+import type { EntryInfo } from '../types/entry-types';\nimport type { MessageStore } from '../types/message-types';\nimport { createSelector } from 'reselect';\n+import { createObjectSelector } from 'reselect-map';\nimport _flow from 'lodash/fp/flow';\nimport _some from 'lodash/fp/some';\nimport _mapValues from 'lodash/fp/mapValues';\n@@ -38,23 +38,14 @@ import {\nincludeDeletedSelector,\n} from './calendar-filter-selectors';\n-const rawThreadInfosToThreadInfos = (\n- rawThreadInfos: { [id: string]: RawThreadInfo },\n- viewerID: ?string,\n- userInfos: { [id: string]: UserInfo },\n-): { [id: string]: ThreadInfo } =>\n- _mapValues((rawThreadInfo: RawThreadInfo) =>\n- threadInfoFromRawThreadInfo(rawThreadInfo, viewerID, userInfos),\n- )(rawThreadInfos);\n-\ntype ThreadInfoSelectorType = (\nstate: BaseAppState<*>,\n) => { [id: string]: ThreadInfo };\n-const threadInfoSelector: ThreadInfoSelectorType = createSelector(\n+const threadInfoSelector: ThreadInfoSelectorType = createObjectSelector(\n(state: BaseAppState<*>) => state.threadStore.threadInfos,\n(state: BaseAppState<*>) => state.currentUserInfo && state.currentUserInfo.id,\n(state: BaseAppState<*>) => state.userInfos,\n- rawThreadInfosToThreadInfos,\n+ threadInfoFromRawThreadInfo,\n);\nconst canBeOnScreenThreadInfos: (\n@@ -98,26 +89,31 @@ const onScreenEntryEditableThreadInfos: (\n),\n);\n+const entryInfoSelector: (\n+ state: BaseAppState<*>,\n+) => { [id: string]: EntryInfo } = createObjectSelector(\n+ (state: BaseAppState<*>) => state.entryStore.entryInfos,\n+ (state: BaseAppState<*>) => state.currentUserInfo && state.currentUserInfo.id,\n+ (state: BaseAppState<*>) => state.userInfos,\n+ createEntryInfo,\n+);\n+\n// \"current\" means within startDate/endDate range, not deleted, and in\n// onScreenThreadInfos\nconst currentDaysToEntries: (\nstate: BaseAppState<*>,\n) => { [dayString: string]: EntryInfo[] } = createSelector(\n- (state: BaseAppState<*>) => state.entryStore.entryInfos,\n+ entryInfoSelector,\n(state: BaseAppState<*>) => state.entryStore.daysToEntries,\n(state: BaseAppState<*>) => state.navInfo.startDate,\n(state: BaseAppState<*>) => state.navInfo.endDate,\n- (state: BaseAppState<*>) => state.userInfos,\n- (state: BaseAppState<*>) => state.currentUserInfo && state.currentUserInfo.id,\nonScreenThreadInfos,\nincludeDeletedSelector,\n(\n- entryInfos: { [id: string]: RawEntryInfo },\n+ entryInfos: { [id: string]: EntryInfo },\ndaysToEntries: { [day: string]: string[] },\nstartDateString: string,\nendDateString: string,\n- userInfos: { [id: string]: UserInfo },\n- viewerID: ?string,\nonScreen: ThreadInfo[],\nincludeDeleted: boolean,\n) => {\n@@ -133,9 +129,7 @@ const currentDaysToEntries: (\n}\nreturn _mapValuesWithKeys((_: string[], dayString: string) =>\n_flow(\n- _map((entryID: string) =>\n- createEntryInfo(entryInfos[entryID], viewerID, userInfos),\n- ),\n+ _map((entryID: string) => entryInfos[entryID]),\n_compact,\n_filter(\n(entryInfo: EntryInfo) =>\n@@ -247,10 +241,10 @@ const mostRecentReadThreadSelector: (\n);\nexport {\n- rawThreadInfosToThreadInfos,\nthreadInfoSelector,\nonScreenThreadInfos,\nonScreenEntryEditableThreadInfos,\n+ entryInfoSelector,\ncurrentDaysToEntries,\nchildThreadInfos,\nunreadCount,\n"
},
{
"change_type": "MODIFY",
"old_path": "server/loader.mjs",
"new_path": "server/loader.mjs",
"diff": "@@ -11,6 +11,7 @@ const readFile = promisify(fs.readFile);\nconst forceResolveAsModule = {\n'reselect': 'module',\n'redux': 'module',\n+ 'reselect-map': 'jsnext:main',\n};\nasync function resolve(\n"
},
{
"change_type": "MODIFY",
"old_path": "web/selectors/chat-selectors.js",
"new_path": "web/selectors/chat-selectors.js",
"diff": "import type { AppState } from '../redux-setup';\nimport type { ThreadInfo } from 'lib/types/thread-types';\n-import type { MessageStore } from 'lib/types/message-types';\n-import type { UserInfo } from 'lib/types/user-types';\n+import type { MessageStore, MessageInfo } from 'lib/types/message-types';\nimport { createSelector } from 'reselect';\nimport { threadInfoSelector } from 'lib/selectors/thread-selectors';\nimport {\n+ messageInfoSelector,\ntype ChatThreadItem,\ncreateChatThreadItem,\nchatListData,\n@@ -21,14 +21,12 @@ const activeChatThreadItem: (\n) => ?ChatThreadItem = createSelector(\nthreadInfoSelector,\n(state: AppState) => state.messageStore,\n- (state: AppState) => state.currentUserInfo && state.currentUserInfo.id,\n- (state: AppState) => state.userInfos,\n+ messageInfoSelector,\n(state: AppState) => state.navInfo.activeChatThreadID,\n(\nthreadInfos: { [id: string]: ThreadInfo },\nmessageStore: MessageStore,\n- viewerID: ?string,\n- userInfos: { [id: string]: UserInfo },\n+ messageInfos: { [id: string]: MessageInfo },\nactiveChatThreadID: ?string,\n): ?ChatThreadItem => {\nif (!activeChatThreadID) {\n@@ -38,13 +36,7 @@ const activeChatThreadItem: (\nif (!threadInfo) {\nreturn null;\n}\n- return createChatThreadItem(\n- threadInfo,\n- threadInfos,\n- messageStore,\n- viewerID,\n- userInfos,\n- );\n+ return createChatThreadItem(threadInfo, messageStore, messageInfos);\n},\n);\n@@ -69,14 +61,12 @@ const webMessageListData: (\n) => ?(ChatMessageItem[]) = createSelector(\n(state: AppState) => state.navInfo.activeChatThreadID,\n(state: AppState) => state.messageStore,\n- (state: AppState) => state.currentUserInfo && state.currentUserInfo.id,\n- (state: AppState) => state.userInfos,\n+ messageInfoSelector,\nthreadInfoSelector,\n(\nthreadID: ?string,\nmessageStore: MessageStore,\n- viewerID: ?string,\n- userInfos: { [id: string]: UserInfo },\n+ messageInfos: { [id: string]: MessageInfo },\nthreadInfos: { [id: string]: ThreadInfo },\n): ?(ChatMessageItem[]) => {\nif (!threadID) {\n@@ -85,8 +75,7 @@ const webMessageListData: (\nreturn createChatMessageItems(\nthreadID,\nmessageStore,\n- viewerID,\n- userInfos,\n+ messageInfos,\nthreadInfos,\n);\n},\n"
},
{
"change_type": "MODIFY",
"old_path": "web/selectors/entry-selectors.js",
"new_path": "web/selectors/entry-selectors.js",
"diff": "// @flow\nimport type { AppState } from '../redux-setup';\n-import type { RawEntryInfo, EntryInfo } from 'lib/types/entry-types';\n-import type { UserInfo } from 'lib/types/user-types';\n+import type { EntryInfo } from 'lib/types/entry-types';\nimport { createSelector } from 'reselect';\nimport _mapValues from 'lodash/fp/mapValues';\n@@ -10,26 +9,20 @@ import _flow from 'lodash/fp/flow';\nimport _map from 'lodash/fp/map';\nimport _compact from 'lodash/fp/compact';\n-import { createEntryInfo } from 'lib/shared/entry-utils';\n+import { entryInfoSelector } from 'lib/selectors/thread-selectors';\nconst allDaysToEntries: (\nstate: AppState,\n) => { [dayString: string]: EntryInfo[] } = createSelector(\n- (state: AppState) => state.entryStore.entryInfos,\n+ entryInfoSelector,\n(state: AppState) => state.entryStore.daysToEntries,\n- (state: AppState) => state.userInfos,\n- (state: AppState) => state.currentUserInfo && state.currentUserInfo.id,\n(\n- entryInfos: { [id: string]: RawEntryInfo },\n+ entryInfos: { [id: string]: EntryInfo },\ndaysToEntries: { [day: string]: string[] },\n- userInfos: { [id: string]: UserInfo },\n- viewerID: ?string,\n) =>\n_mapValues((entryIDs: string[]) =>\n_flow(\n- _map((entryID: string) =>\n- createEntryInfo(entryInfos[entryID], viewerID, userInfos),\n- ),\n+ _map((entryID: string) => entryInfos[entryID]),\n_compact,\n)(entryIDs),\n)(daysToEntries),\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "@@ -12461,6 +12461,11 @@ requires-port@^1.0.0:\nresolved \"https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff\"\nintegrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=\n+reselect-map@^1.0.5:\n+ version \"1.0.5\"\n+ resolved \"https://registry.yarnpkg.com/reselect-map/-/reselect-map-1.0.5.tgz#d7792208d888afd0a6e2da8e6933b7f0a7635295\"\n+ integrity sha512-+2sIc2ebte8JV61I7b3KdmgxcrtUxhpMP5VQtaPVzM/Lajer91i+vIKPgOqy7kCkcsUPV0yaa8BWE2GrDXwmBw==\n+\nreselect@^4.0.0:\nversion \"4.0.0\"\nresolved \"https://registry.yarnpkg.com/reselect/-/reselect-4.0.0.tgz#f2529830e5d3d0e021408b246a206ef4ea4437f7\"\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | Use reselect-map to memoize individual Redux-stored objects
This should be a pretty significant perf improvement! |
129,187 | 09.06.2020 11:14:01 | 14,400 | 08b59c80caf902562e5eafc934249e21511c7378 | [web] Use lighter link color for chat messages with dark background | [
{
"change_type": "MODIFY",
"old_path": "web/chat/chat-message-list.css",
"new_path": "web/chat/chat-message-list.css",
"diff": "@@ -187,6 +187,18 @@ span.authorName {\nfont-size: 14px;\npadding: 4px 24px;\n}\n+div.darkTextMessage {\n+ color: 'white';\n+}\n+div.lightTextMessage {\n+ color: 'black';\n+}\n+div.darkTextMessage a {\n+ color: #129AFF;\n+}\n+div.lightTextMessage a {\n+ color: #2A5DB0;\n+}\ndiv.content {\ndisplay: flex;\n"
},
{
"change_type": "MODIFY",
"old_path": "web/chat/text-message.react.js",
"new_path": "web/chat/text-message.react.js",
"diff": "@@ -68,24 +68,25 @@ class TextMessage extends React.PureComponent<Props> {\ncreator: { isViewer },\n} = this.props.item.messageInfo;\n- const onlyEmoji = onlyEmojiRegex.test(text);\n- const messageClassName = classNames({\n- [css.textMessage]: true,\n- [css.normalTextMessage]: !onlyEmoji,\n- [css.emojiOnlyTextMessage]: onlyEmoji,\n- });\n-\nconst messageStyle = {};\n+ let darkColor = false;\nif (isViewer) {\nconst threadColor = this.props.threadInfo.color;\n- const darkColor = colorIsDark(threadColor);\n+ darkColor = colorIsDark(threadColor);\nmessageStyle.backgroundColor = `#${threadColor}`;\n- messageStyle.color = darkColor ? 'white' : 'black';\n} else {\nmessageStyle.backgroundColor = 'rgba(221,221,221,0.73)';\n- messageStyle.color = 'black';\n}\n+ const onlyEmoji = onlyEmojiRegex.test(text);\n+ const messageClassName = classNames({\n+ [css.textMessage]: true,\n+ [css.normalTextMessage]: !onlyEmoji,\n+ [css.emojiOnlyTextMessage]: onlyEmoji,\n+ [css.darkTextMessage]: darkColor,\n+ [css.lightTextMessage]: !darkColor,\n+ });\n+\nreturn (\n<ComposedMessage\nitem={this.props.item}\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [web] Use lighter link color for chat messages with dark background |
129,187 | 09.06.2020 15:26:39 | 14,400 | d60e76734dc83f00d630c437b7c9008aa4f746ba | [native] Memoize ThreadSettings listData | [
{
"change_type": "MODIFY",
"old_path": "native/chat/settings/thread-settings.react.js",
"new_path": "native/chat/settings/thread-settings.react.js",
"diff": "@@ -14,11 +14,12 @@ import type { ChatNavigationProp } from '../chat.react';\nimport type { TabNavigationProp } from '../../navigation/app-navigator.react';\nimport type { NavigationRoute } from '../../navigation/route-names';\n-import React from 'react';\n+import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { View, FlatList } from 'react-native';\nimport invariant from 'invariant';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\n+import { createSelector } from 'reselect';\nimport { relativeMemberInfoSelectorForMembersOfThread } from 'lib/selectors/user-selectors';\nimport {\n@@ -201,6 +202,7 @@ type State = {|\ncolorEditValue: string,\nverticalBounds: ?VerticalBounds,\n|};\n+type PropsAndState = {| ...Props, ...State |};\nclass ThreadSettings extends React.PureComponent<Props, State> {\nstatic propTypes = {\nnavigation: PropTypes.shape({\n@@ -242,7 +244,9 @@ class ThreadSettings extends React.PureComponent<Props, State> {\n};\n}\n- static getThreadInfo(props: Props): ThreadInfo {\n+ static getThreadInfo(props: {\n+ route: NavigationRoute<'ThreadSettings'>,\n+ }): ThreadInfo {\nreturn props.route.params.threadInfo;\n}\n@@ -315,17 +319,45 @@ class ThreadSettings extends React.PureComponent<Props, State> {\n}\n}\n- render() {\n- const threadInfo = ThreadSettings.getThreadInfo(this.props);\n-\n- const canStartEditing = !this.props.somethingIsSaving;\n+ listDataSelector = createSelector(\n+ (propsAndState: PropsAndState) =>\n+ ThreadSettings.getThreadInfo(propsAndState),\n+ (propsAndState: PropsAndState) => propsAndState.nameEditValue,\n+ (propsAndState: PropsAndState) => propsAndState.nameTextHeight,\n+ (propsAndState: PropsAndState) => propsAndState.colorEditValue,\n+ (propsAndState: PropsAndState) => propsAndState.descriptionEditValue,\n+ (propsAndState: PropsAndState) => propsAndState.descriptionTextHeight,\n+ (propsAndState: PropsAndState) => !propsAndState.somethingIsSaving,\n+ (propsAndState: PropsAndState) => propsAndState.navigation.navigate,\n+ (propsAndState: PropsAndState) => propsAndState.route.key,\n+ (propsAndState: PropsAndState) => propsAndState.childThreadInfos,\n+ (propsAndState: PropsAndState) => propsAndState.showMaxChildThreads,\n+ (propsAndState: PropsAndState) => propsAndState.threadMembers,\n+ (propsAndState: PropsAndState) => propsAndState.showMaxMembers,\n+ (propsAndState: PropsAndState) => propsAndState.verticalBounds,\n+ (\n+ threadInfo: ThreadInfo,\n+ nameEditValue: ?string,\n+ nameTextHeight: ?number,\n+ colorEditValue: string,\n+ descriptionEditValue: ?string,\n+ descriptionTextHeight: ?number,\n+ canStartEditing: boolean,\n+ navigate: ThreadSettingsNavigate,\n+ routeKey: string,\n+ childThreads: ?(ThreadInfo[]),\n+ showMaxChildThreads: number,\n+ threadMembers: RelativeMemberInfo[],\n+ showMaxMembers: number,\n+ verticalBounds: ?VerticalBounds,\n+ ) => {\nconst canEditThread = threadHasPermission(\nthreadInfo,\nthreadPermissions.EDIT_THREAD,\n);\nconst canChangeSettings = canEditThread && canStartEditing;\n- let listData: ChatSettingsItem[] = [];\n+ const listData: ChatSettingsItem[] = [];\nlistData.push({\nitemType: 'header',\nkey: 'basicsHeader',\n@@ -336,18 +368,18 @@ class ThreadSettings extends React.PureComponent<Props, State> {\nitemType: 'name',\nkey: 'name',\nthreadInfo,\n- nameEditValue: this.state.nameEditValue,\n- nameTextHeight: this.state.nameTextHeight,\n+ nameEditValue,\n+ nameTextHeight,\ncanChangeSettings,\n});\nlistData.push({\nitemType: 'color',\nkey: 'color',\nthreadInfo,\n- colorEditValue: this.state.colorEditValue,\n+ colorEditValue,\ncanChangeSettings,\n- navigate: this.props.navigation.navigate,\n- threadSettingsRouteKey: this.props.route.key,\n+ navigate,\n+ threadSettingsRouteKey: routeKey,\n});\nlistData.push({\nitemType: 'footer',\n@@ -356,8 +388,7 @@ class ThreadSettings extends React.PureComponent<Props, State> {\n});\nif (\n- (this.state.descriptionEditValue !== null &&\n- this.state.descriptionEditValue !== undefined) ||\n+ (descriptionEditValue !== null && descriptionEditValue !== undefined) ||\nthreadInfo.description ||\ncanEditThread\n) {\n@@ -365,8 +396,8 @@ class ThreadSettings extends React.PureComponent<Props, State> {\nitemType: 'description',\nkey: 'description',\nthreadInfo,\n- descriptionEditValue: this.state.descriptionEditValue,\n- descriptionTextHeight: this.state.descriptionTextHeight,\n+ descriptionEditValue,\n+ descriptionTextHeight,\ncanChangeSettings,\n});\n}\n@@ -398,7 +429,7 @@ class ThreadSettings extends React.PureComponent<Props, State> {\nitemType: 'parent',\nkey: 'parent',\nthreadInfo,\n- navigate: this.props.navigation.navigate,\n+ navigate,\n});\nlistData.push({\nitemType: 'visibility',\n@@ -412,34 +443,31 @@ class ThreadSettings extends React.PureComponent<Props, State> {\n});\nlet childThreadItems = null;\n- if (this.props.childThreadInfos) {\n+ if (childThreads) {\nlet childThreadInfosSlice;\nlet seeMoreChildThreads = null;\n- if (this.props.childThreadInfos.length > this.state.showMaxChildThreads) {\n- childThreadInfosSlice = this.props.childThreadInfos.slice(\n- 0,\n- this.state.showMaxChildThreads,\n- );\n+ if (childThreads.length > showMaxChildThreads) {\n+ childThreadInfosSlice = childThreads.slice(0, showMaxChildThreads);\nseeMoreChildThreads = {\nitemType: 'seeMore',\nkey: 'seeMoreChildThreads',\nonPress: this.onPressSeeMoreChildThreads,\n};\n} else {\n- childThreadInfosSlice = this.props.childThreadInfos;\n+ childThreadInfosSlice = childThreads;\n}\n- const childThreads = childThreadInfosSlice.map(childThreadInfo => ({\n+ const childThreadSlice = childThreadInfosSlice.map(childThreadInfo => ({\nitemType: 'childThread',\nkey: `childThread${childThreadInfo.id}`,\nthreadInfo: childThreadInfo,\n- navigate: this.props.navigation.navigate,\n+ navigate,\nlastListItem: false,\n}));\nif (seeMoreChildThreads) {\n- childThreadItems = [...childThreads, seeMoreChildThreads];\n+ childThreadItems = [...childThreadSlice, seeMoreChildThreads];\n} else {\n- childThreads[childThreads.length - 1].lastListItem = true;\n- childThreadItems = childThreads;\n+ childThreadSlice[childThreadSlice.length - 1].lastListItem = true;\n+ childThreadItems = childThreadSlice;\n}\n}\n@@ -467,7 +495,7 @@ class ThreadSettings extends React.PureComponent<Props, State> {\nlistData.push(addChildThread);\n}\nif (childThreadItems) {\n- listData = [...listData, ...childThreadItems];\n+ listData.push(...childThreadItems);\n}\nif (addChildThread || childThreadItems) {\nlistData.push({\n@@ -477,39 +505,36 @@ class ThreadSettings extends React.PureComponent<Props, State> {\n});\n}\n- let threadMembers;\n+ let threadMemberItems;\nlet seeMoreMembers = null;\n- if (this.props.threadMembers.length > this.state.showMaxMembers) {\n- threadMembers = this.props.threadMembers.slice(\n- 0,\n- this.state.showMaxMembers,\n- );\n+ if (threadMembers.length > showMaxMembers) {\n+ threadMemberItems = threadMembers.slice(0, showMaxMembers);\nseeMoreMembers = {\nitemType: 'seeMore',\nkey: 'seeMoreMembers',\nonPress: this.onPressSeeMoreMembers,\n};\n} else {\n- threadMembers = this.props.threadMembers;\n+ threadMemberItems = threadMembers;\n}\n- const { verticalBounds } = this.state;\n- const members = threadMembers.map(memberInfo => ({\n+ const members = threadMemberItems.map(memberInfo => ({\nitemType: 'member',\nkey: `member${memberInfo.id}`,\nmemberInfo,\nthreadInfo,\ncanEdit: canStartEditing,\n- navigate: this.props.navigation.navigate,\n+ navigate,\nlastListItem: false,\nverticalBounds,\n- threadSettingsRouteKey: this.props.route.key,\n+ threadSettingsRouteKey: routeKey,\n}));\n- let memberItems;\n+\n+ let membershipItems;\nif (seeMoreMembers) {\n- memberItems = [...members, seeMoreMembers];\n+ membershipItems = [...members, seeMoreMembers];\n} else if (members.length > 0) {\nmembers[members.length - 1].lastListItem = true;\n- memberItems = members;\n+ membershipItems = members;\n}\nlet addMembers = null;\n@@ -524,7 +549,7 @@ class ThreadSettings extends React.PureComponent<Props, State> {\n};\n}\n- if (addMembers || memberItems) {\n+ if (addMembers || membershipItems) {\nlistData.push({\nitemType: 'header',\nkey: 'memberHeader',\n@@ -535,10 +560,10 @@ class ThreadSettings extends React.PureComponent<Props, State> {\nif (addMembers) {\nlistData.push(addMembers);\n}\n- if (memberItems) {\n- listData = [...listData, ...memberItems];\n+ if (membershipItems) {\n+ listData.push(...membershipItems);\n}\n- if (addMembers || memberItems) {\n+ if (addMembers || membershipItems) {\nlistData.push({\nitemType: 'footer',\nkey: 'memberFooter',\n@@ -572,7 +597,7 @@ class ThreadSettings extends React.PureComponent<Props, State> {\nitemType: 'deleteThread',\nkey: 'deleteThread',\nthreadInfo,\n- navigate: this.props.navigation.navigate,\n+ navigate,\ncanLeaveThread: !!canLeaveThread,\n});\n}\n@@ -584,6 +609,15 @@ class ThreadSettings extends React.PureComponent<Props, State> {\n});\n}\n+ return listData;\n+ },\n+ );\n+\n+ get listData() {\n+ return this.listDataSelector({ ...this.props, ...this.state });\n+ }\n+\n+ render() {\nreturn (\n<View\nstyle={this.props.styles.container}\n@@ -591,7 +625,7 @@ class ThreadSettings extends React.PureComponent<Props, State> {\nonLayout={this.onFlatListContainerLayout}\n>\n<FlatList\n- data={listData}\n+ data={this.listData}\ncontentContainerStyle={this.props.styles.flatList}\nrenderItem={this.renderItem}\nscrollEnabled={!ThreadSettings.scrollDisabled(this.props)}\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Memoize ThreadSettings listData |
129,187 | 10.06.2020 10:59:59 | 14,400 | 2a5253b1775ad488d718386d856cce3162486a80 | [native] Preserve ChatList scroll position when new messages appear
Unless scrolled to bottom, in which case we will animate them in | [
{
"change_type": "MODIFY",
"old_path": "native/chat/chat-list.react.js",
"new_path": "native/chat/chat-list.react.js",
"diff": "@@ -6,31 +6,43 @@ import type {\n} from 'react-native/Libraries/Lists/FlatList';\nimport type { ChatNavigationProp } from './chat.react';\nimport type { TabNavigationProp } from '../navigation/app-navigator.react';\n+import type { ChatMessageItemWithHeight } from './message-list-container.react';\nimport * as React from 'react';\nimport { FlatList, LayoutAnimation } from 'react-native';\nimport invariant from 'invariant';\n+import _sum from 'lodash/fp/sum';\n-type Props<T> = {\n- ...React.Config<FlatListProps<T>, FlatListDefaultProps>,\n+import { messageKey } from 'lib/shared/message-utils';\n+\n+import { messageItemHeight } from './message.react';\n+\n+function chatMessageItemKey(item: ChatMessageItemWithHeight) {\n+ if (item.itemType === 'loader') {\n+ return 'loader';\n+ }\n+ return messageKey(item.messageInfo);\n+}\n+\n+function chatMessageItemHeight(item: ChatMessageItemWithHeight) {\n+ if (item.itemType === 'loader') {\n+ return 56;\n+ }\n+ return messageItemHeight(item);\n+}\n+\n+type Props = {\n+ ...React.Config<\n+ FlatListProps<ChatMessageItemWithHeight>,\n+ FlatListDefaultProps,\n+ >,\nnavigation: ChatNavigationProp<'MessageList'>,\n- loadingFromScroll: boolean,\n+ data: $ReadOnlyArray<ChatMessageItemWithHeight>,\n};\n-type State = {|\n- pendingScrollAppend: boolean,\n-|};\n-class ChatList<T> extends React.PureComponent<Props<T>, State> {\n+class ChatList extends React.PureComponent<Props> {\nscrollPos = 0;\n- scrollHeight: ?number;\nflatList: ?React.ElementRef<typeof FlatList>;\n- constructor(props: Props<T>) {\n- super(props);\n- this.state = {\n- pendingScrollAppend: props.loadingFromScroll,\n- };\n- }\n-\ncomponentDidMount() {\nconst tabNavigation: ?TabNavigationProp<\n'Chat',\n@@ -59,27 +71,79 @@ class ChatList<T> extends React.PureComponent<Props<T>, State> {\n}\n};\n- componentDidUpdate(prevProps: Props<T>) {\n- if (this.props.loadingFromScroll && !prevProps.loadingFromScroll) {\n- this.setState({ pendingScrollAppend: true });\n+ get scrolledToBottom() {\n+ const { scrollPos } = this;\n+ return scrollPos === null || scrollPos === undefined || scrollPos <= 0;\n}\n- const itemsAdded =\n- this.props.data &&\n- (!prevProps.data || this.props.data.length > prevProps.data.length);\n- if (itemsAdded && !this.state.pendingScrollAppend && this.scrollPos <= 0) {\n+ componentDidUpdate(prevProps: Props) {\n+ const { flatList } = this;\n+ if (!flatList || this.props.data.length === prevProps.data.length) {\n+ return;\n+ }\n+\n+ if (this.props.data.length < prevProps.data.length) {\n+ // This should only happen due to MessageStorePruner,\n+ // which will only prune a thread when it is off-screen\n+ flatList.scrollToOffset({ offset: 0, animated: false });\n+ return;\n+ }\n+\n+ const scrollPos = this.scrollPos ? this.scrollPos : 0;\n+\n+ let curDataIndex = 0,\n+ prevDataIndex = 0,\n+ heightSoFar = 0;\n+ let adjustScrollPos = 0;\n+ while (prevDataIndex < prevProps.data.length && heightSoFar <= scrollPos) {\n+ const prevItem = prevProps.data[prevDataIndex];\n+ invariant(prevItem, 'prevDatum should exist');\n+ const prevItemKey = chatMessageItemKey(prevItem);\n+ const prevItemHeight = chatMessageItemHeight(prevItem);\n+\n+ let curItem = this.props.data[curDataIndex];\n+ while (curItem && chatMessageItemKey(curItem) !== prevItemKey) {\n+ adjustScrollPos += chatMessageItemHeight(curItem);\n+ curDataIndex++;\n+ curItem = this.props.data[curDataIndex];\n+ }\n+ if (!curItem) {\n+ // Should never happen...\n+ console.log(`items added to ChatList, but ${prevItemKey} now missing`);\n+ return;\n+ }\n+\n+ const curItemHeight = chatMessageItemHeight(curItem);\n+ adjustScrollPos += curItemHeight - prevItemHeight;\n+\n+ heightSoFar += prevItemHeight;\n+ prevDataIndex++;\n+ curDataIndex++;\n+ }\n+\n+ if (scrollPos <= 0 && adjustScrollPos > 0) {\n+ // This indicates we're scrolled to the bottom and something just got\n+ // prepended to the front (bottom) of the chat list. We'll animate it in\n+ // and we won't adjust scroll position\nLayoutAnimation.easeInEaseOut();\n+ return;\n}\n+\n+ flatList.scrollToOffset({\n+ offset: scrollPos + adjustScrollPos,\n+ animated: false,\n+ });\n}\nrender() {\n- const { loadingFromScroll, ...rest } = this.props;\n+ const { navigation, ...rest } = this.props;\nreturn (\n<FlatList\n{...rest}\n- ref={this.flatListRef}\n+ keyExtractor={chatMessageItemKey}\n+ getItemLayout={ChatList.getItemLayout}\nonScroll={this.onScroll}\n- onContentSizeChange={this.onContentSizeChange}\n+ ref={this.flatListRef}\n/>\n);\n}\n@@ -88,6 +152,25 @@ class ChatList<T> extends React.PureComponent<Props<T>, State> {\nthis.flatList = flatList;\n};\n+ static getItemLayout(\n+ data: ?$ReadOnlyArray<ChatMessageItemWithHeight>,\n+ index: number,\n+ ) {\n+ if (!data) {\n+ return { length: 0, offset: 0, index };\n+ }\n+ const offset = ChatList.heightOfItems(data.filter((_, i) => i < index));\n+ const item = data[index];\n+ const length = item ? chatMessageItemHeight(item) : 0;\n+ return { length, offset, index };\n+ }\n+\n+ static heightOfItems(\n+ data: $ReadOnlyArray<ChatMessageItemWithHeight>,\n+ ): number {\n+ return _sum(data.map(chatMessageItemHeight));\n+ }\n+\nonScroll = (event: {\nnativeEvent: {\ncontentOffset: { y: number },\n@@ -95,47 +178,9 @@ class ChatList<T> extends React.PureComponent<Props<T>, State> {\n},\n}) => {\nthis.scrollPos = event.nativeEvent.contentOffset.y;\n- this.adjustScrollPos(event.nativeEvent.contentSize.height);\n// $FlowFixMe FlatList doesn't type ScrollView props\nthis.props.onScroll && this.props.onScroll(event);\n};\n-\n- onContentSizeChange = (contentWidth: number, contentHeight: number) => {\n- this.adjustScrollPos(contentHeight);\n- // $FlowFixMe FlatList doesn't type ScrollView props\n- this.props.onContentSizeChange &&\n- this.props.onContentSizeChange(contentWidth, contentHeight);\n- };\n-\n- adjustScrollPos(scrollHeight: number) {\n- const oldScrollHeight = this.scrollHeight;\n- this.scrollHeight = scrollHeight;\n- if (\n- oldScrollHeight === null ||\n- oldScrollHeight === undefined ||\n- scrollHeight === oldScrollHeight ||\n- this.scrollPos <= 0\n- ) {\n- return;\n- }\n-\n- if (this.state.pendingScrollAppend) {\n- this.setState({ pendingScrollAppend: false });\n- return;\n- }\n-\n- const { flatList } = this;\n- invariant(flatList, 'should be set');\n-\n- const change = scrollHeight - oldScrollHeight;\n- const newPos = this.scrollPos + change;\n- flatList.scrollToOffset({ offset: newPos, animated: false });\n- }\n-\n- get scrolledToBottom() {\n- const { scrollPos } = this;\n- return scrollPos === null || scrollPos === undefined || scrollPos <= 0;\n- }\n}\nexport default ChatList;\n"
},
{
"change_type": "MODIFY",
"old_path": "native/chat/message-list.react.js",
"new_path": "native/chat/message-list.react.js",
"diff": "@@ -18,7 +18,6 @@ import type { NavigationRoute } from '../navigation/route-names';\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { View, TouchableWithoutFeedback } from 'react-native';\n-import _sum from 'lodash/fp/sum';\nimport _find from 'lodash/fp/find';\nimport { createSelector } from 'reselect';\nimport invariant from 'invariant';\n@@ -34,13 +33,8 @@ import {\nimport threadWatcher from 'lib/shared/thread-watcher';\nimport { threadInChatList } from 'lib/shared/thread-utils';\nimport { registerFetchKey } from 'lib/reducers/loading-reducer';\n-import ChatList from './chat-list.react';\n-import {\n- Message,\n- messageItemHeight,\n- type ChatMessageInfoItemWithHeight,\n-} from './message.react';\n+import { Message, type ChatMessageInfoItemWithHeight } from './message.react';\nimport ListLoadingIndicator from '../components/list-loading-indicator.react';\nimport { styleSelector } from '../themes/colors';\nimport {\n@@ -53,6 +47,7 @@ import {\nkeyboardStatePropType,\nwithKeyboardState,\n} from '../keyboard/keyboard-state';\n+import ChatList from './chat-list.react';\ntype Props = {|\nthreadInfo: ThreadInfo,\n@@ -249,37 +244,6 @@ class MessageList extends React.PureComponent<Props, State> {\n}\n};\n- static keyExtractor(item: ChatMessageItemWithHeight) {\n- if (item.itemType === 'loader') {\n- return 'loader';\n- }\n- return messageKey(item.messageInfo);\n- }\n-\n- getItemLayout = (\n- data: ?$ReadOnlyArray<ChatMessageItemWithHeight>,\n- index: number,\n- ) => {\n- if (!data) {\n- return { length: 0, offset: 0, index };\n- }\n- const offset = this.heightOfItems(data.filter((_, i) => i < index));\n- const item = data[index];\n- const length = item ? this.itemHeight(item) : 0;\n- return { length, offset, index };\n- };\n-\n- itemHeight = (item: ChatMessageItemWithHeight): number => {\n- if (item.itemType === 'loader') {\n- return 56;\n- }\n- return messageItemHeight(item);\n- };\n-\n- heightOfItems(data: $ReadOnlyArray<ChatMessageItemWithHeight>): number {\n- return _sum(data.map(this.itemHeight));\n- }\n-\n// Actually header, it's just that our FlatList is inverted\nListFooterComponent = () => <View style={this.props.styles.header} />;\n@@ -293,13 +257,10 @@ class MessageList extends React.PureComponent<Props, State> {\nonLayout={this.onFlatListContainerLayout}\n>\n<ChatList\n- loadingFromScroll={this.state.loadingFromScroll}\nnavigation={this.props.navigation}\ninverted={true}\ndata={messageListData}\nrenderItem={this.renderItem}\n- keyExtractor={MessageList.keyExtractor}\n- getItemLayout={this.getItemLayout}\nonViewableItemsChanged={this.onViewableItemsChanged}\nListFooterComponent={footer}\nscrollsToTop={false}\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Preserve ChatList scroll position when new messages appear
Unless scrolled to bottom, in which case we will animate them in |
129,187 | 10.06.2020 11:57:54 | 14,400 | f55ff08ad23e64972636de69bcf21ecc4474abe5 | [native] Scroll to the bottom of the ChatList when a client sends a new message | [
{
"change_type": "MODIFY",
"old_path": "native/chat/chat-list.react.js",
"new_path": "native/chat/chat-list.react.js",
"diff": "@@ -94,7 +94,8 @@ class ChatList extends React.PureComponent<Props> {\nlet curDataIndex = 0,\nprevDataIndex = 0,\nheightSoFar = 0;\n- let adjustScrollPos = 0;\n+ let adjustScrollPos = 0,\n+ newLocalMessage = false;\nwhile (prevDataIndex < prevProps.data.length && heightSoFar <= scrollPos) {\nconst prevItem = prevProps.data[prevDataIndex];\ninvariant(prevItem, 'prevDatum should exist');\n@@ -102,8 +103,17 @@ class ChatList extends React.PureComponent<Props> {\nconst prevItemHeight = chatMessageItemHeight(prevItem);\nlet curItem = this.props.data[curDataIndex];\n- while (curItem && chatMessageItemKey(curItem) !== prevItemKey) {\n+ while (curItem) {\n+ const curItemKey = chatMessageItemKey(curItem);\n+ if (curItemKey === prevItemKey) {\n+ break;\n+ }\n+\n+ if (curItemKey.startsWith('local')) {\n+ newLocalMessage = true;\n+ }\nadjustScrollPos += chatMessageItemHeight(curItem);\n+\ncurDataIndex++;\ncurItem = this.props.data[curDataIndex];\n}\n@@ -121,19 +131,28 @@ class ChatList extends React.PureComponent<Props> {\ncurDataIndex++;\n}\n+ if (adjustScrollPos === 0) {\n+ return;\n+ }\n+\nif (scrollPos <= 0 && adjustScrollPos > 0) {\n// This indicates we're scrolled to the bottom and something just got\n// prepended to the front (bottom) of the chat list. We'll animate it in\n// and we won't adjust scroll position\nLayoutAnimation.easeInEaseOut();\n- return;\n- }\n-\n+ } else if (newLocalMessage) {\n+ // This indicates the current client just sent a new message, but we are\n+ // scrolled up in the ChatList. We'll scroll back down to show the new\n+ // message\n+ flatList.scrollToOffset({ offset: 0 });\n+ LayoutAnimation.easeInEaseOut();\n+ } else {\nflatList.scrollToOffset({\noffset: scrollPos + adjustScrollPos,\nanimated: false,\n});\n}\n+ }\nrender() {\nconst { navigation, ...rest } = this.props;\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Scroll to the bottom of the ChatList when a client sends a new message |
129,187 | 10.06.2020 12:25:31 | 14,400 | 88ffdd87688f3d9df71846259fd8551b18c0b150 | [native] Make sure RobotextMessage's height matches TextHeightMeasurer
Similar to what we do now in `InnerTextMessage` and `MultimediaMessage`. This is necessary to make sure we are able to smoothly seek to any scroll position in the `ChatList` | [
{
"change_type": "MODIFY",
"old_path": "native/chat/robotext-message.react.js",
"new_path": "native/chat/robotext-message.react.js",
"diff": "@@ -126,9 +126,17 @@ class RobotextMessage extends React.PureComponent<Props> {\ntextParts.push(rawText);\n}\n}\n+ const textStyle = [\n+ this.props.styles.robotext,\n+ { height: item.contentHeight },\n+ ];\nreturn (\n- <Hyperlink linkDefault={true} linkStyle={this.props.styles.link}>\n- <Text style={this.props.styles.robotext}>{textParts}</Text>\n+ <Hyperlink\n+ linkDefault={true}\n+ linkStyle={this.props.styles.link}\n+ style={this.props.styles.robotextContainer}\n+ >\n+ <Text style={textStyle}>{textParts}</Text>\n</Hyperlink>\n);\n}\n@@ -199,13 +207,15 @@ const styles = {\nlink: {\ncolor: 'link',\n},\n+ robotextContainer: {\n+ marginBottom: 5,\n+ marginHorizontal: 24,\n+ paddingVertical: 6,\n+ },\nrobotext: {\ncolor: 'listForegroundSecondaryLabel',\nfontFamily: 'Arial',\nfontSize: 15,\n- marginBottom: 5,\n- marginHorizontal: 24,\n- paddingVertical: 6,\ntextAlign: 'center',\n},\n};\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Make sure RobotextMessage's height matches TextHeightMeasurer
Similar to what we do now in `InnerTextMessage` and `MultimediaMessage`. This is necessary to make sure we are able to smoothly seek to any scroll position in the `ChatList` |
129,187 | 10.06.2020 12:58:25 | 14,400 | 5f847dd42df9529347c5a3ccee481f8c3d364998 | [web] Fix typo in TextMessage text color | [
{
"change_type": "MODIFY",
"old_path": "web/chat/chat-message-list.css",
"new_path": "web/chat/chat-message-list.css",
"diff": "@@ -188,10 +188,10 @@ span.authorName {\npadding: 4px 24px;\n}\ndiv.darkTextMessage {\n- color: 'white';\n+ color: white;\n}\ndiv.lightTextMessage {\n- color: 'black';\n+ color: black;\n}\ndiv.darkTextMessage a {\ncolor: #129AFF;\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [web] Fix typo in TextMessage text color |
129,187 | 10.06.2020 14:41:14 | 14,400 | ab6d1a91c34f62427a342e16784c82a0200ecf54 | [native] useStyles | [
{
"change_type": "MODIFY",
"old_path": "native/themes/colors.js",
"new_path": "native/themes/colors.js",
"diff": "@@ -148,10 +148,7 @@ type ReplaceStyleObject = <Obj: { [key: string]: number | string }>(\nObj,\n) => $ObjMap<Obj, ReplaceField>;\n-export type StyleSheetOf<S: Styles> = $Call<\n- typeof StyleSheet.create,\n- $ObjMap<S, ReplaceStyleObject>,\n->;\n+export type StyleSheetOf<S: Styles> = $ObjMap<S, ReplaceStyleObject>;\nfunction stylesFromColors<IS: Styles>(\nobj: IS,\n@@ -183,6 +180,17 @@ function styleSelector<IS: Styles>(\n);\n}\n+function useStyles<IS: Styles>(obj: IS): StyleSheetOf<IS> {\n+ const theme = useSelector(\n+ (state: AppState) => state.globalThemeInfo.activeTheme,\n+ );\n+ const explicitTheme = theme ? theme : 'light';\n+ return React.useMemo(() => stylesFromColors(obj, colors[explicitTheme]), [\n+ obj,\n+ explicitTheme,\n+ ]);\n+}\n+\nfunction useOverlayStyles<IS: Styles>(obj: IS): StyleSheetOf<IS> {\nconst navContext = React.useContext(NavContext);\nconst navigationState = navContext && navContext.state;\n@@ -208,5 +216,6 @@ export {\ncolors,\ncolorsSelector,\nstyleSelector,\n+ useStyles,\nuseOverlayStyles,\n};\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] useStyles |
129,187 | 10.06.2020 14:43:16 | 14,400 | 8922c21d69c378aa57918021a40d78145d2d7e30 | [native] NewMessagesPill | [
{
"change_type": "MODIFY",
"old_path": "native/chat/chat-list.react.js",
"new_path": "native/chat/chat-list.react.js",
"diff": "@@ -7,15 +7,25 @@ import type {\nimport type { ChatNavigationProp } from './chat.react';\nimport type { TabNavigationProp } from '../navigation/app-navigator.react';\nimport type { ChatMessageItemWithHeight } from './message-list-container.react';\n+import type { ViewStyle } from '../types/styles';\n+import type { AppState } from '../redux/redux-setup';\nimport * as React from 'react';\n-import { FlatList, LayoutAnimation } from 'react-native';\n+import {\n+ FlatList,\n+ LayoutAnimation,\n+ Animated,\n+ Easing,\n+ StyleSheet,\n+} from 'react-native';\nimport invariant from 'invariant';\nimport _sum from 'lodash/fp/sum';\nimport { messageKey } from 'lib/shared/message-utils';\n+import { connect } from 'lib/utils/redux-utils';\nimport { messageItemHeight } from './message.react';\n+import NewMessagesPill from './new-messages-pill.react';\nfunction chatMessageItemKey(item: ChatMessageItemWithHeight) {\nif (item.itemType === 'loader') {\n@@ -31,6 +41,11 @@ function chatMessageItemHeight(item: ChatMessageItemWithHeight) {\nreturn messageItemHeight(item);\n}\n+const animationSpec = {\n+ duration: 150,\n+ useNativeDriver: true,\n+};\n+\ntype Props = {\n...React.Config<\nFlatListProps<ChatMessageItemWithHeight>,\n@@ -38,10 +53,34 @@ type Props = {\n>,\nnavigation: ChatNavigationProp<'MessageList'>,\ndata: $ReadOnlyArray<ChatMessageItemWithHeight>,\n+ // Redux state\n+ viewerID: ?string,\n};\n-class ChatList extends React.PureComponent<Props> {\n- scrollPos = 0;\n+type State = {|\n+ newMessageCount: number,\n+|};\n+class ChatList extends React.PureComponent<Props, State> {\n+ state = {\n+ newMessageCount: 0,\n+ };\n+\nflatList: ?React.ElementRef<typeof FlatList>;\n+ scrollPos = 0;\n+\n+ newMessagesPillProgress = new Animated.Value(0);\n+ newMessagesPillStyle: ViewStyle;\n+\n+ constructor(props: Props) {\n+ super(props);\n+ const sendButtonTranslateY = this.newMessagesPillProgress.interpolate({\n+ inputRange: [0, 1],\n+ outputRange: [10, 0],\n+ });\n+ this.newMessagesPillStyle = {\n+ opacity: this.newMessagesPillProgress,\n+ transform: [{ translateY: sendButtonTranslateY }],\n+ };\n+ }\ncomponentDidMount() {\nconst tabNavigation: ?TabNavigationProp<\n@@ -95,7 +134,8 @@ class ChatList extends React.PureComponent<Props> {\nprevDataIndex = 0,\nheightSoFar = 0;\nlet adjustScrollPos = 0,\n- newLocalMessage = false;\n+ newLocalMessage = false,\n+ newRemoteMessageCount = 0;\nwhile (prevDataIndex < prevProps.data.length && heightSoFar <= scrollPos) {\nconst prevItem = prevProps.data[prevDataIndex];\ninvariant(prevItem, 'prevDatum should exist');\n@@ -111,6 +151,11 @@ class ChatList extends React.PureComponent<Props> {\nif (curItemKey.startsWith('local')) {\nnewLocalMessage = true;\n+ } else if (\n+ curItem.itemType === 'message' &&\n+ curItem.messageInfo.creator.id !== this.props.viewerID\n+ ) {\n+ newRemoteMessageCount++;\n}\nadjustScrollPos += chatMessageItemHeight(curItem);\n@@ -151,12 +196,20 @@ class ChatList extends React.PureComponent<Props> {\noffset: scrollPos + adjustScrollPos,\nanimated: false,\n});\n+ if (newRemoteMessageCount > 0) {\n+ this.setState(prevState => ({\n+ newMessageCount: prevState.newMessageCount + newRemoteMessageCount,\n+ }));\n+ this.toggleNewMessagesPill(true);\n+ }\n}\n}\nrender() {\n- const { navigation, ...rest } = this.props;\n+ const { navigation, viewerID, ...rest } = this.props;\n+ const { newMessageCount } = this.state;\nreturn (\n+ <>\n<FlatList\n{...rest}\nkeyExtractor={chatMessageItemKey}\n@@ -164,6 +217,14 @@ class ChatList extends React.PureComponent<Props> {\nonScroll={this.onScroll}\nref={this.flatListRef}\n/>\n+ <NewMessagesPill\n+ onPress={this.onPressNewMessagesPill}\n+ newMessageCount={newMessageCount}\n+ pointerEvents={newMessageCount > 0 ? 'auto' : 'none'}\n+ containerStyle={styles.newMessagesPillContainer}\n+ style={this.newMessagesPillStyle}\n+ />\n+ </>\n);\n}\n@@ -190,6 +251,18 @@ class ChatList extends React.PureComponent<Props> {\nreturn _sum(data.map(chatMessageItemHeight));\n}\n+ toggleNewMessagesPill(show: boolean) {\n+ Animated.timing(this.newMessagesPillProgress, {\n+ ...animationSpec,\n+ easing: show ? Easing.ease : Easing.out(Easing.ease),\n+ toValue: show ? 1 : 0,\n+ }).start(({ finished }) => {\n+ if (finished && !show) {\n+ this.setState({ newMessageCount: 0 });\n+ }\n+ });\n+ }\n+\nonScroll = (event: {\nnativeEvent: {\ncontentOffset: { y: number },\n@@ -197,9 +270,31 @@ class ChatList extends React.PureComponent<Props> {\n},\n}) => {\nthis.scrollPos = event.nativeEvent.contentOffset.y;\n+ if (this.scrollPos <= 0) {\n+ this.toggleNewMessagesPill(false);\n+ }\n// $FlowFixMe FlatList doesn't type ScrollView props\nthis.props.onScroll && this.props.onScroll(event);\n};\n+\n+ onPressNewMessagesPill = () => {\n+ const { flatList } = this;\n+ if (!flatList) {\n+ return;\n+ }\n+ flatList.scrollToOffset({ offset: 0 });\n+ this.toggleNewMessagesPill(false);\n+ };\n}\n-export default ChatList;\n+const styles = StyleSheet.create({\n+ newMessagesPillContainer: {\n+ bottom: 30,\n+ position: 'absolute',\n+ right: 30,\n+ },\n+});\n+\n+export default connect((state: AppState) => ({\n+ viewerID: state.currentUserInfo && state.currentUserInfo.id,\n+}))(ChatList);\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "native/chat/new-messages-pill.react.js",
"diff": "+// @flow\n+\n+import type { ViewStyle } from '../types/styles';\n+\n+import * as React from 'react';\n+import { TouchableOpacity, View, Text, Platform, Animated } from 'react-native';\n+import Icon from 'react-native-vector-icons/FontAwesome';\n+\n+import { useStyles } from '../themes/colors';\n+\n+type Props = {|\n+ onPress: () => mixed,\n+ newMessageCount: number,\n+ containerStyle?: ViewStyle,\n+ style?: ViewStyle,\n+ ...$Shape<React.ElementProps<typeof View>>,\n+|};\n+function NewMessagesPill(props: Props) {\n+ const {\n+ onPress,\n+ newMessageCount,\n+ containerStyle,\n+ style,\n+ ...containerProps\n+ } = props;\n+ const styles = useStyles(unboundStyles);\n+ return (\n+ <View {...containerProps} style={containerStyle}>\n+ <TouchableOpacity onPress={onPress} activeOpacity={0.9}>\n+ <Animated.View style={[styles.button, style]}>\n+ <Icon name=\"angle-double-down\" style={styles.icon} />\n+ <View style={styles.countBubble}>\n+ <Text style={styles.countText}>{newMessageCount}</Text>\n+ </View>\n+ </Animated.View>\n+ </TouchableOpacity>\n+ </View>\n+ );\n+}\n+\n+const unboundStyles = {\n+ countBubble: {\n+ alignItems: 'center',\n+ backgroundColor: 'greenButton',\n+ borderRadius: 25,\n+ height: 25,\n+ justifyContent: 'center',\n+ paddingBottom: Platform.OS === 'android' ? 2 : 0,\n+ paddingLeft: 1,\n+ position: 'absolute',\n+ right: -8,\n+ top: -8,\n+ width: 25,\n+ },\n+ countText: {\n+ color: 'white',\n+ textAlign: 'center',\n+ },\n+ button: {\n+ backgroundColor: 'floatingButtonBackground',\n+ borderColor: 'floatingButtonLabel',\n+ borderRadius: 30,\n+ borderWidth: 4,\n+ paddingHorizontal: 12,\n+ paddingVertical: 6,\n+ },\n+ icon: {\n+ color: 'floatingButtonLabel',\n+ fontSize: 32,\n+ fontWeight: 'bold',\n+ },\n+};\n+\n+export default NewMessagesPill;\n"
},
{
"change_type": "MODIFY",
"old_path": "native/themes/colors.js",
"new_path": "native/themes/colors.js",
"diff": "@@ -64,6 +64,8 @@ const light = Object.freeze({\nlistSearchIcon: '#AAAAAA',\nlistChatBubble: '#DDDDDDBB',\nnavigationCard: '#FFFFFF',\n+ floatingButtonBackground: '#999999',\n+ floatingButtonLabel: '#EEEEEE',\n});\nexport type Colors = $Exact<typeof light>;\n@@ -123,6 +125,8 @@ const dark: Colors = Object.freeze({\nlistSearchIcon: '#AAAAAA',\nlistChatBubble: '#444444DD',\nnavigationCard: '#2A2A2A',\n+ floatingButtonBackground: '#666666',\n+ floatingButtonLabel: 'white',\n});\nconst colors = { light, dark };\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] NewMessagesPill |
129,187 | 10.06.2020 14:47:58 | 14,400 | 5b9f7d6636829ab02650fb0f4ef9708b3aa7a2d8 | [native] Swallow exceptions thrown by SplashScreen.hideAsync | [
{
"change_type": "MODIFY",
"old_path": "native/navigation/app-navigator.react.js",
"new_path": "native/navigation/app-navigator.react.js",
"diff": "@@ -137,7 +137,9 @@ function AppNavigator(props: AppNavigatorProps) {\nsplashScreenHasHidden = true;\n(async () => {\nawait waitForInteractions();\n+ try {\nawait SplashScreen.hideAsync();\n+ } catch {}\n})();\n}, []);\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Swallow exceptions thrown by SplashScreen.hideAsync |
129,187 | 10.06.2020 15:21:38 | 14,400 | cb547827bb47ac0a1ef95ddd9010d44faa1d7d74 | [native] Move SendMediaButton from Reanimated to core Animated | [
{
"change_type": "MODIFY",
"old_path": "native/media/media-gallery-keyboard.react.js",
"new_path": "native/media/media-gallery-keyboard.react.js",
"diff": "@@ -15,7 +15,8 @@ import {\nText,\nFlatList,\nActivityIndicator,\n- Platform,\n+ Animated,\n+ Easing,\n} from 'react-native';\nimport { KeyboardRegistry } from 'react-native-keyboard-input';\nimport invariant from 'invariant';\n@@ -25,7 +26,6 @@ import * as MediaLibrary from 'expo-media-library';\nimport { connect } from 'lib/utils/redux-utils';\nimport { extensionFromFilename } from 'lib/media/file-utils';\n-import sleep from 'lib/utils/sleep';\nimport { store } from '../redux/redux-setup';\nimport {\n@@ -33,7 +33,6 @@ import {\ncontentBottomOffset,\n} from '../selectors/dimension-selectors';\nimport MediaGalleryMedia from './media-gallery-media.react';\n-import Animated, { Easing } from 'react-native-reanimated';\nimport {\ntype Colors,\ncolorsPropType,\n@@ -46,6 +45,7 @@ import { getCompatibleMediaURI } from './identifier-utils';\nconst animationSpec = {\nduration: 400,\neasing: Easing.inOut(Easing.ease),\n+ useNativeDriver: true,\n};\ntype Props = {|\n@@ -76,14 +76,13 @@ class MediaGalleryKeyboard extends React.PureComponent<Props, State> {\nfetchingPhotos = false;\nflatList: ?FlatList<MediaLibrarySelection>;\nviewableIndices: number[] = [];\n- // eslint-disable-next-line import/no-named-as-default-member\nqueueModeProgress = new Animated.Value(0);\nsendButtonStyle: ViewStyle;\nmediaSelected = false;\nconstructor(props: Props) {\nsuper(props);\n- const sendButtonScale = Animated.interpolate(this.queueModeProgress, {\n+ const sendButtonScale = this.queueModeProgress.interpolate({\ninputRange: [0, 1],\noutputRange: [1.3, 1],\n});\n@@ -122,13 +121,11 @@ class MediaGalleryKeyboard extends React.PureComponent<Props, State> {\nconst { queuedMediaURIs } = this.state;\nconst prevQueuedMediaURIs = prevState.queuedMediaURIs;\nif (queuedMediaURIs && !prevQueuedMediaURIs) {\n- // eslint-disable-next-line import/no-named-as-default-member\nAnimated.timing(this.queueModeProgress, {\n...animationSpec,\ntoValue: 1,\n}).start();\n} else if (!queuedMediaURIs && prevQueuedMediaURIs) {\n- // eslint-disable-next-line import/no-named-as-default-member\nAnimated.timing(this.queueModeProgress, {\n...animationSpec,\ntoValue: 0,\n@@ -302,14 +299,6 @@ class MediaGalleryKeyboard extends React.PureComponent<Props, State> {\n}\nasync getPermissions(): Promise<boolean> {\n- // For some reason, react-native-reanimated@1.8.0 on Android renders the\n- // very first frame of SendMediaButton incorrectly. opacity is set to new\n- // Value(0), but on the first frame it appears as 1. On Android requesting\n- // permissions freezes your current activity, so we want to make sure that\n- // we're rendering correctly before the freeze occurs.\n- if (Platform.OS === 'android') {\n- await sleep(5);\n- }\nconst { granted } = await MediaLibrary.requestPermissionsAsync();\nif (!granted) {\nthis.guardedSetState({ error: \"don't have permission :(\" });\n"
},
{
"change_type": "MODIFY",
"old_path": "native/media/send-media-button.react.js",
"new_path": "native/media/send-media-button.react.js",
"diff": "@@ -9,9 +9,9 @@ import {\nText,\nStyleSheet,\nPlatform,\n+ Animated,\n} from 'react-native';\nimport Icon from 'react-native-vector-icons/FontAwesome';\n-import Animated from 'react-native-reanimated';\ntype Props = {|\nonPress: () => mixed,\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Move SendMediaButton from Reanimated to core Animated |
129,187 | 10.06.2020 15:43:30 | 14,400 | 776b0733c14571f4c62c8d01fdf71eaac34f9e96 | [native] Make sure Tooltip button isn't smaller than source
Not sure why this is necessary but I observed an edge case where the button rendered with `initialCoordinates` is slightly more narrow than the source, causing the `Text` to wrap differently | [
{
"change_type": "MODIFY",
"old_path": "native/chat/text-message-tooltip-button.react.js",
"new_path": "native/chat/text-message-tooltip-button.react.js",
"diff": "@@ -61,17 +61,6 @@ class TextMessageTooltipButton extends React.PureComponent<Props> {\n};\n}\n- get messageStyle() {\n- const { item } = this.props.route.params;\n- return {\n- position: 'absolute',\n- height: item.contentHeight,\n- width: this.props.screenDimensions.width,\n- left: 0,\n- top: 0,\n- };\n- }\n-\nrender() {\nconst { item } = this.props.route.params;\nreturn (\n"
},
{
"change_type": "MODIFY",
"old_path": "native/navigation/tooltip.react.js",
"new_path": "native/navigation/tooltip.react.js",
"diff": "@@ -240,8 +240,8 @@ function createTooltip<\nconst { initialCoordinates, verticalBounds } = params;\nconst { x, y, width, height } = initialCoordinates;\nreturn {\n- width,\n- height,\n+ width: Math.ceil(width),\n+ height: Math.ceil(height),\nmarginTop: y - verticalBounds.y,\nmarginLeft: x,\n};\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Make sure Tooltip button isn't smaller than source
Not sure why this is necessary but I observed an edge case where the button rendered with `initialCoordinates` is slightly more narrow than the source, causing the `Text` to wrap differently |
129,187 | 11.06.2020 10:38:01 | 14,400 | 945886cd99cbeb060ce8111589ee5dc2c99b81aa | [lib] Don't call setLateResponse for a replaced socket
Fixes a bug where the `DisconnectedBar` got stuck on | [
{
"change_type": "MODIFY",
"old_path": "lib/socket/inflight-requests.js",
"new_path": "lib/socket/inflight-requests.js",
"diff": "@@ -221,11 +221,12 @@ class InflightRequests {\n}\nrejectAll(error: Error) {\n- for (let inflightRequest of this.data) {\n- // Though the promise rejection below should call clearRequest when it's\n- // caught in fetchResponse, that doesn't happen synchronously. Socket\n- // won't close unless all requests are resolved, so we clear immediately\n- this.clearRequest(inflightRequest);\n+ const { data } = this;\n+ // Though the promise rejections below should call clearRequest when they're\n+ // caught in fetchResponse, that doesn't happen synchronously. Socket won't\n+ // close unless all requests are resolved, so we clear this.data immediately\n+ this.data = [];\n+ for (let inflightRequest of data) {\nconst { reject } = inflightRequest;\nreject(error);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "lib/socket/socket.react.js",
"new_path": "lib/socket/socket.react.js",
"diff": "@@ -196,7 +196,11 @@ class Socket extends React.PureComponent<Props, State> {\nthis.finishClosingSocket();\n}\n},\n- setLateResponse: this.setLateResponse,\n+ setLateResponse: (messageID: number, isLate: boolean) => {\n+ if (this.socket === socket) {\n+ this.setLateResponse(messageID, isLate);\n+ }\n+ },\n}),\n});\n}\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [lib] Don't call setLateResponse for a replaced socket
Fixes a bug where the `DisconnectedBar` got stuck on |
129,187 | 11.06.2020 13:09:57 | 14,400 | 762fffa174605e57ea8d7258c384b0b5ad4eec75 | Include ffmpeg stats in MediaMissionReport | [
{
"change_type": "MODIFY",
"old_path": "lib/types/media-types.js",
"new_path": "lib/types/media-types.js",
"diff": "@@ -99,6 +99,19 @@ export type UploadDeletionRequest = {|\nid: string,\n|};\n+export type FFmpegStatistics = {|\n+ // seconds of video being processed per second\n+ +speed: number,\n+ // total milliseconds of video processed so far\n+ +time: number,\n+ // total result file size in bytes so far\n+ +size: number,\n+ +videoQuality: number,\n+ +videoFrameNumber: number,\n+ +videoFps: number,\n+ +bitrate: number,\n+|};\n+\nexport type VideoProbeMediaMissionStep = {|\nstep: 'video_probe',\nsuccess: boolean,\n@@ -304,6 +317,7 @@ export type MediaMissionStep =\ntime: number, // ms\nreturnCode: ?number,\nnewPath: ?string,\n+ stats: ?FFmpegStatistics,\n|}\n| DisposeTemporaryFileMediaMissionStep\n| {|\n@@ -621,6 +635,7 @@ export const mediaMissionStepPropType = PropTypes.oneOfType([\ntime: PropTypes.number.isRequired,\nreturnCode: PropTypes.number,\nnewPath: PropTypes.string,\n+ stats: PropTypes.object,\n}),\nPropTypes.shape({\nstep: PropTypes.oneOf(['dispose_temporary_file']).isRequired,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/media/ffmpeg.js",
"new_path": "native/media/ffmpeg.js",
"diff": "// @flow\n+import type { FFmpegStatistics } from 'lib/types/media-types';\n+\nimport { RNFFmpeg, RNFFprobe, RNFFmpegConfig } from 'react-native-ffmpeg';\nimport invariant from 'invariant';\n@@ -17,25 +19,13 @@ type QueuedCommand = {|\nrunCommand: () => Promise<void>,\n|};\n-type StatisticsData = {|\n- // seconds of video being processed per second\n- +speed: number,\n- // total milliseconds of video processed so far\n- +time: number,\n- // total result file size in bytes so far\n- +size: number,\n- +videoQuality: number,\n- +videoFrameNumber: number,\n- +videoFps: number,\n- +bitrate: number,\n-|};\n-\nclass FFmpeg {\nqueue: QueuedCommand[] = [];\ncurrentCalls: CallCounter = { process: 0, probe: 0 };\n// The length of the video that's currently being transcoded in seconds\nactiveCommandInputVideoDuration: ?number;\n+ lastStats: ?FFmpegStatistics;\nconstructor() {\nRNFFmpegConfig.enableStatisticsCallback(this.statisticsCallback);\n@@ -96,10 +86,11 @@ class FFmpeg {\nprocess(ffmpegCommand: string, inputVideoDuration: number) {\nconst duration = inputVideoDuration > 0 ? inputVideoDuration : 0.001;\n- const wrappedCommand = () => {\n+ const wrappedCommand = async () => {\nRNFFmpegConfig.resetStatistics();\nthis.activeCommandInputVideoDuration = duration;\n- return RNFFmpeg.execute(ffmpegCommand);\n+ const ffmpegResult = await RNFFmpeg.execute(ffmpegCommand);\n+ return { ...ffmpegResult, lastStats: this.lastStats };\n};\nreturn this.queueCommand('process', wrappedCommand);\n}\n@@ -144,7 +135,8 @@ class FFmpeg {\nreturn numFrames > 1;\n}\n- statisticsCallback = (statisticsData: StatisticsData) => {\n+ statisticsCallback = (statisticsData: FFmpegStatistics) => {\n+ this.lastStats = statisticsData;\nconst { time } = statisticsData;\nconst videoDuration = this.activeCommandInputVideoDuration;\ninvariant(videoDuration, 'should be set');\n"
},
{
"change_type": "MODIFY",
"old_path": "native/media/video-utils.js",
"new_path": "native/media/video-utils.js",
"diff": "@@ -102,25 +102,23 @@ async function processVideo(\nlet returnCode,\nnewPath,\n+ stats,\nsuccess = false,\nexceptionMessage;\nconst start = Date.now();\ntry {\n- const { rc } = await ffmpeg.process(ffmpegCommand, duration);\n+ const { rc, lastStats } = await ffmpeg.process(ffmpegCommand, duration);\nsuccess = rc === 0;\nif (success) {\nreturnCode = rc;\nnewPath = outputPath;\n+ stats = lastStats;\n}\n} catch (e) {\nexceptionMessage = getMessageForException(e);\n}\nif (!success) {\n- (async () => {\n- try {\n- await filesystem.unlink(outputPath);\n- } catch {}\n- })();\n+ unlink(outputPath);\n}\nsteps.push({\n@@ -130,6 +128,7 @@ async function processVideo(\ntime: Date.now() - start,\nreturnCode,\nnewPath,\n+ stats,\n});\nif (!success) {\n@@ -142,7 +141,7 @@ async function processVideo(\nconst transcodeProbeStep = await checkVideoInfo(outputPath);\nsteps.push(transcodeProbeStep);\nif (!transcodeProbeStep.validFormat) {\n- filesystem.unlink(outputPath);\n+ unlink(outputPath);\nreturn {\nsteps,\nresult: { success: false, reason: 'video_transcode_failed' },\n@@ -201,4 +200,10 @@ async function checkVideoInfo(\n};\n}\n+async function unlink(path: string) {\n+ try {\n+ await filesystem.unlink(path);\n+ } catch {}\n+}\n+\nexport { processVideo };\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | Include ffmpeg stats in MediaMissionReport |
129,187 | 11.06.2020 14:50:49 | 14,400 | f04dabc3d66bf696fd457b33463bb15da3fc54e4 | [native] Pull React Nav libdefs from flow-typed
Now that my PR has been accepted. Also gets rid of some stubs we don't need anymore that were breaking `flow-typed install` | [
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js",
"diff": "+// flow-typed signature: cda2e1070bd5c208e1fcf2ea5754e687\n+// flow-typed version: ecee683170/@react-navigation/bottom-tabs_v5.x.x/flow_>=v0.104.x\n+\ndeclare module '@react-navigation/bottom-tabs' {\n//---------------------------------------------------------------------------\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/core_v5.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/core_v5.x.x.js",
"diff": "+// flow-typed signature: c6b613396e54f513d277ef7bfe8c82da\n+// flow-typed version: ecee683170/@react-navigation/core_v5.x.x/flow_>=v0.104.x\n+\ndeclare module '@react-navigation/core' {\n//---------------------------------------------------------------------------\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js",
"diff": "+// flow-typed signature: 810b43b04ec962bd02054f1b6ff4946b\n+// flow-typed version: ecee683170/@react-navigation/material-top-tabs_v5.x.x/flow_>=v0.104.x\n+\ndeclare module '@react-navigation/material-top-tabs' {\n//---------------------------------------------------------------------------\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js",
"diff": "+// flow-typed signature: 29924eb8e26fde756f5fb3e95110620f\n+// flow-typed version: ecee683170/@react-navigation/native_v5.x.x/flow_>=v0.104.x\n+\ndeclare module '@react-navigation/native' {\n//---------------------------------------------------------------------------\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js",
"diff": "+// flow-typed signature: adaa100b411117a447158bc40021cd46\n+// flow-typed version: ecee683170/@react-navigation/stack_v5.x.x/flow_>=v0.104.x\n+\ndeclare module '@react-navigation/stack' {\n//---------------------------------------------------------------------------\n"
},
{
"change_type": "DELETE",
"old_path": "native/flow-typed/npm/react-native-exit-app_vx.x.x.js",
"new_path": null,
"diff": "-// flow-typed signature: fa39b916c7ab3a48f278ed4e9761f098\n-// flow-typed version: <<STUB>>/react-native-exit-app_vgit+https://github.com/wumke/react-native-exit-app.git#460d40aaacb1aa95d7ed5f21e7906ba930c74301/flow_v0.98.0\n-\n-/**\n- * This is an autogenerated libdef stub for:\n- *\n- * 'react-native-exit-app'\n- *\n- * Fill this stub out by replacing all the `any` types.\n- *\n- * Once filled out, we encourage you to share your work with the\n- * community by sending a pull request to:\n- * https://github.com/flowtype/flow-typed\n- */\n-\n-declare module 'react-native-exit-app' {\n- declare module.exports: any;\n-}\n-\n-/**\n- * We include stubs for each file inside this npm package in case you need to\n- * require those files directly. Feel free to delete any files that aren't\n- * needed.\n- */\n-\n-\n-// Filename aliases\n-declare module 'react-native-exit-app/index' {\n- declare module.exports: $Exports<'react-native-exit-app'>;\n-}\n-declare module 'react-native-exit-app/index.js' {\n- declare module.exports: $Exports<'react-native-exit-app'>;\n-}\n"
},
{
"change_type": "DELETE",
"old_path": "native/flow-typed/npm/react-native-hyperlink_vx.x.x.js",
"new_path": null,
"diff": "-// flow-typed signature: 376180abc93a0c967d46c581b367977c\n-// flow-typed version: <<STUB>>/react-native-hyperlink_vgit+https://git@github.com/ashoat/react-native-hyperlink.git#both/flow_v0.98.0\n-\n-/**\n- * This is an autogenerated libdef stub for:\n- *\n- * 'react-native-hyperlink'\n- *\n- * Fill this stub out by replacing all the `any` types.\n- *\n- * Once filled out, we encourage you to share your work with the\n- * community by sending a pull request to:\n- * https://github.com/flowtype/flow-typed\n- */\n-\n-declare module 'react-native-hyperlink' {\n- declare module.exports: any;\n-}\n-\n-/**\n- * We include stubs for each file inside this npm package in case you need to\n- * require those files directly. Feel free to delete any files that aren't\n- * needed.\n- */\n-declare module 'react-native-hyperlink/dist/index' {\n- declare module.exports: any;\n-}\n-\n-declare module 'react-native-hyperlink/src/Hyperlink' {\n- declare module.exports: any;\n-}\n-\n-// Filename aliases\n-declare module 'react-native-hyperlink/dist/index.js' {\n- declare module.exports: $Exports<'react-native-hyperlink/dist/index'>;\n-}\n-declare module 'react-native-hyperlink/src/Hyperlink.js' {\n- declare module.exports: $Exports<'react-native-hyperlink/src/Hyperlink'>;\n-}\n"
},
{
"change_type": "DELETE",
"old_path": "native/flow-typed/npm/react-native-notifications_vx.x.x.js",
"new_path": null,
"diff": "-// flow-typed signature: 3d307898a3746a1696b248c8886ed89f\n-// flow-typed version: <<STUB>>/react-native-notifications_vgit+https://git@github.com/ashoat/react-native-notifications.git/flow_v0.98.0\n-\n-/**\n- * This is an autogenerated libdef stub for:\n- *\n- * 'react-native-notifications'\n- *\n- * Fill this stub out by replacing all the `any` types.\n- *\n- * Once filled out, we encourage you to share your work with the\n- * community by sending a pull request to:\n- * https://github.com/flowtype/flow-typed\n- */\n-\n-declare module 'react-native-notifications' {\n- declare module.exports: any;\n-}\n-\n-/**\n- * We include stubs for each file inside this npm package in case you need to\n- * require those files directly. Feel free to delete any files that aren't\n- * needed.\n- */\n-declare module 'react-native-notifications/example/index.android' {\n- declare module.exports: any;\n-}\n-\n-declare module 'react-native-notifications/example/index.ios' {\n- declare module.exports: any;\n-}\n-\n-declare module 'react-native-notifications/index.android' {\n- declare module.exports: any;\n-}\n-\n-declare module 'react-native-notifications/index.ios' {\n- declare module.exports: any;\n-}\n-\n-declare module 'react-native-notifications/notification.android' {\n- declare module.exports: any;\n-}\n-\n-declare module 'react-native-notifications/notification.ios' {\n- declare module.exports: any;\n-}\n-\n-declare module 'react-native-notifications/test/index.android.spec' {\n- declare module.exports: any;\n-}\n-\n-declare module 'react-native-notifications/test/index.ios.spec' {\n- declare module.exports: any;\n-}\n-\n-declare module 'react-native-notifications/test/notification.ios.spec' {\n- declare module.exports: any;\n-}\n-\n-// Filename aliases\n-declare module 'react-native-notifications/example/index.android.js' {\n- declare module.exports: $Exports<'react-native-notifications/example/index.android'>;\n-}\n-declare module 'react-native-notifications/example/index.ios.js' {\n- declare module.exports: $Exports<'react-native-notifications/example/index.ios'>;\n-}\n-declare module 'react-native-notifications/index.android.js' {\n- declare module.exports: $Exports<'react-native-notifications/index.android'>;\n-}\n-declare module 'react-native-notifications/index.ios.js' {\n- declare module.exports: $Exports<'react-native-notifications/index.ios'>;\n-}\n-declare module 'react-native-notifications/notification.android.js' {\n- declare module.exports: $Exports<'react-native-notifications/notification.android'>;\n-}\n-declare module 'react-native-notifications/notification.ios.js' {\n- declare module.exports: $Exports<'react-native-notifications/notification.ios'>;\n-}\n-declare module 'react-native-notifications/test/index.android.spec.js' {\n- declare module.exports: $Exports<'react-native-notifications/test/index.android.spec'>;\n-}\n-declare module 'react-native-notifications/test/index.ios.spec.js' {\n- declare module.exports: $Exports<'react-native-notifications/test/index.ios.spec'>;\n-}\n-declare module 'react-native-notifications/test/notification.ios.spec.js' {\n- declare module.exports: $Exports<'react-native-notifications/test/notification.ios.spec'>;\n-}\n"
},
{
"change_type": "DELETE",
"old_path": "native/flow-typed/npm/react-native-onepassword_vx.x.x.js",
"new_path": null,
"diff": "-// flow-typed signature: 4dc48f1433846c22c93e41a3efeee3b6\n-// flow-typed version: <<STUB>>/react-native-onepassword_vgit+https://git@github.com/DriveWealth/react-native-onepassword.git#aed794d8c6f0f2560b62a0012449abf6f1b3576c/flow_v0.98.0\n-\n-/**\n- * This is an autogenerated libdef stub for:\n- *\n- * 'react-native-onepassword'\n- *\n- * Fill this stub out by replacing all the `any` types.\n- *\n- * Once filled out, we encourage you to share your work with the\n- * community by sending a pull request to:\n- * https://github.com/flowtype/flow-typed\n- */\n-\n-declare module 'react-native-onepassword' {\n- declare module.exports: any;\n-}\n-\n-/**\n- * We include stubs for each file inside this npm package in case you need to\n- * require those files directly. Feel free to delete any files that aren't\n- * needed.\n- */\n-declare module 'react-native-onepassword/OnePassword.android' {\n- declare module.exports: any;\n-}\n-\n-declare module 'react-native-onepassword/OnePassword.ios' {\n- declare module.exports: any;\n-}\n-\n-// Filename aliases\n-declare module 'react-native-onepassword/OnePassword.android.js' {\n- declare module.exports: $Exports<'react-native-onepassword/OnePassword.android'>;\n-}\n-declare module 'react-native-onepassword/OnePassword.ios.js' {\n- declare module.exports: $Exports<'react-native-onepassword/OnePassword.ios'>;\n-}\n"
},
{
"change_type": "DELETE",
"old_path": "native/flow-typed/npm/react-native-popover-tooltip_vx.x.x.js",
"new_path": null,
"diff": "-// flow-typed signature: 1daaef4adbdf7bfd1cabe37203d9ff99\n-// flow-typed version: <<STUB>>/react-native-popover-tooltip_vgit+https://git@github.com/ashoat/react-native-popover-tooltip.git/flow_v0.61.0\n-\n-/**\n- * This is an autogenerated libdef stub for:\n- *\n- * 'react-native-popover-tooltip'\n- *\n- * Fill this stub out by replacing all the `any` types.\n- *\n- * Once filled out, we encourage you to share your work with the\n- * community by sending a pull request to:\n- * https://github.com/flowtype/flow-typed\n- */\n-\n-declare module 'react-native-popover-tooltip' {\n- declare module.exports: any;\n-}\n-\n-/**\n- * We include stubs for each file inside this npm package in case you need to\n- * require those files directly. Feel free to delete any files that aren't\n- * needed.\n- */\n-declare module 'react-native-popover-tooltip/demo/App' {\n- declare module.exports: any;\n-}\n-\n-declare module 'react-native-popover-tooltip/demo/App.test' {\n- declare module.exports: any;\n-}\n-\n-declare module 'react-native-popover-tooltip/src/index' {\n- declare module.exports: any;\n-}\n-\n-declare module 'react-native-popover-tooltip/src/PopoverTooltipItem' {\n- declare module.exports: any;\n-}\n-\n-// Filename aliases\n-declare module 'react-native-popover-tooltip/demo/App.js' {\n- declare module.exports: $Exports<'react-native-popover-tooltip/demo/App'>;\n-}\n-declare module 'react-native-popover-tooltip/demo/App.test.js' {\n- declare module.exports: $Exports<'react-native-popover-tooltip/demo/App.test'>;\n-}\n-declare module 'react-native-popover-tooltip/src/index.js' {\n- declare module.exports: $Exports<'react-native-popover-tooltip/src/index'>;\n-}\n-declare module 'react-native-popover-tooltip/src/PopoverTooltipItem.js' {\n- declare module.exports: $Exports<'react-native-popover-tooltip/src/PopoverTooltipItem'>;\n-}\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Pull React Nav libdefs from flow-typed
Now that my PR has been accepted. Also gets rid of some stubs we don't need anymore that were breaking `flow-typed install` |
129,187 | 11.06.2020 14:53:56 | 14,400 | 9ca29731f4e01b9d58cccfab5de43160c79798da | [native] codeVersion -> 52 | [
{
"change_type": "MODIFY",
"old_path": "native/android/app/build.gradle",
"new_path": "native/android/app/build.gradle",
"diff": "@@ -132,8 +132,8 @@ android {\napplicationId \"org.squadcal\"\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 51\n- versionName \"0.0.51\"\n+ versionCode 52\n+ versionName \"0.0.52\"\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "native/ios/SquadCal/Info.debug.plist",
"new_path": "native/ios/SquadCal/Info.debug.plist",
"diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>0.0.51</string>\n+ <string>0.0.52</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>51</string>\n+ <string>52</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/ios/SquadCal/Info.release.plist",
"new_path": "native/ios/SquadCal/Info.release.plist",
"diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>0.0.51</string>\n+ <string>0.0.52</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>51</string>\n+ <string>52</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/redux/persist.js",
"new_path": "native/redux/persist.js",
"diff": "@@ -178,7 +178,7 @@ const persistConfig = {\ntimeout: __DEV__ ? 0 : undefined,\n};\n-const codeVersion = 51;\n+const codeVersion = 52;\n// This local exists to avoid a circular dependency where redux-setup needs to\n// import all the navigation and screen stuff, but some of those screens want to\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] codeVersion -> 52 |
129,187 | 19.06.2020 15:27:39 | 14,400 | e533961312382929f344d28a3be1219b7eb0bcbc | [native] Don't swallow messages sent while ClearableTextInput isn't focused | [
{
"change_type": "MODIFY",
"old_path": "native/components/clearable-text-input.react.ios.js",
"new_path": "native/components/clearable-text-input.react.ios.js",
"diff": "@@ -22,6 +22,7 @@ class ClearableTextInput extends React.PureComponent<\nlastKeyPressed: ?string;\nlastTextInputSent = -1;\ncurrentTextInput: ?TextInput;\n+ focused = false;\nsendMessage() {\nif (this.pendingMessageSent) {\n@@ -104,17 +105,20 @@ class ClearableTextInput extends React.PureComponent<\n};\ntextInputRef = (textInput: ?TextInput) => {\n- if (this.state.textInputKey > 0 && textInput) {\n+ if (this.focused && textInput) {\ntextInput.focus();\n}\nthis.currentTextInput = textInput;\nthis.props.textInputRef(textInput);\n};\n- getValueAndReset(): Promise<string> {\n+ async getValueAndReset(): Promise<string> {\nconst { value } = this.props;\nthis.props.onChangeText('');\n- return new Promise(resolve => {\n+ if (!this.focused) {\n+ return value;\n+ }\n+ return await new Promise(resolve => {\nthis.pendingMessage = { value, resolve };\nthis.setState(prevState => ({\ntextInputKey: prevState.textInputKey + 1,\n@@ -122,6 +126,14 @@ class ClearableTextInput extends React.PureComponent<\n});\n}\n+ onFocus = () => {\n+ this.focused = true;\n+ };\n+\n+ onBlur = () => {\n+ this.focused = false;\n+ };\n+\nrender() {\nconst { textInputRef, ...props } = this.props;\n@@ -142,6 +154,8 @@ class ClearableTextInput extends React.PureComponent<\ntextInputs.push(\n<TextInput\n{...props}\n+ onFocus={this.onFocus}\n+ onBlur={this.onBlur}\nonChangeText={this.props.onChangeText}\nkey={this.state.textInputKey}\nref={this.textInputRef}\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Don't swallow messages sent while ClearableTextInput isn't focused |
129,187 | 19.06.2020 15:44:04 | 14,400 | 47a33a69cb59d1947476a6def148bc3a41e728c7 | [native] codeVersion -> 53
iOS-only release to fix bug where messages were being swallowed | [
{
"change_type": "MODIFY",
"old_path": "native/android/app/build.gradle",
"new_path": "native/android/app/build.gradle",
"diff": "@@ -132,8 +132,8 @@ android {\napplicationId \"org.squadcal\"\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 52\n- versionName \"0.0.52\"\n+ versionCode 53\n+ versionName \"0.0.53\"\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "native/ios/SquadCal/Info.debug.plist",
"new_path": "native/ios/SquadCal/Info.debug.plist",
"diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>0.0.52</string>\n+ <string>0.0.53</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>52</string>\n+ <string>53</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/ios/SquadCal/Info.release.plist",
"new_path": "native/ios/SquadCal/Info.release.plist",
"diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>0.0.52</string>\n+ <string>0.0.53</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>52</string>\n+ <string>53</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/redux/persist.js",
"new_path": "native/redux/persist.js",
"diff": "@@ -178,7 +178,7 @@ const persistConfig = {\ntimeout: __DEV__ ? 0 : undefined,\n};\n-const codeVersion = 52;\n+const codeVersion = 53;\n// This local exists to avoid a circular dependency where redux-setup needs to\n// import all the navigation and screen stuff, but some of those screens want to\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] codeVersion -> 53
iOS-only release to fix bug where messages were being swallowed |
129,187 | 19.06.2020 15:59:51 | 14,400 | 0fe972cc47adb590b169de5440a23e3ebe91c5cb | yarn.lock updates for background threads | [
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "react-is \"^16.13.0\"\nuse-subscription \"^1.4.0\"\n+\"@react-navigation/material-top-tabs@^5.2.9\":\n+ version \"5.2.10\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/material-top-tabs/-/material-top-tabs-5.2.10.tgz#6144217267253fb889d55ba91344832223322e63\"\n+ integrity sha512-CSvX6+9fzi662OXgVRsBe7xiqxmOyHu7S5YWYq0nlTFzdNTov+/JAXe/gRY/N6O6fGNIPBQvp4Y82pWsTG7FPA==\n+ dependencies:\n+ color \"^3.1.2\"\n+\n\"@react-navigation/native@^5.5.1\":\nversion \"5.5.1\"\nresolved \"https://registry.yarnpkg.com/@react-navigation/native/-/native-5.5.1.tgz#e669d9561e54d86b1315637b8d5630dc55ee9383\"\n@@ -11901,6 +11908,11 @@ react-native-screens@^2.7.0:\nresolved \"https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.7.0.tgz#2d3cf3c39a665e9ca1c774264fccdb90e7944047\"\nintegrity sha512-n/23IBOkrTKCfuUd6tFeRkn3lB2QZ3cmvoubRscR0JU/Zl4/ZyKmwnFmUv1/Fr+2GH/H8UTX59kEKDYYg3dMgA==\n+react-native-tab-view@^2.14.4:\n+ version \"2.14.4\"\n+ resolved \"https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-2.14.4.tgz#740007e62c8723c6813b8c8a05caaaf82c816620\"\n+ integrity sha512-oqkCflPFuZwDTbyY2WaN0377akSsmcttuYACR9LT7htZfO/tKR2Z/ynj1tbv2cz2esGuVICoga9cetN1lPimog==\n+\nreact-native-unimodules@^0.9.0:\nversion \"0.9.0\"\nresolved \"https://registry.yarnpkg.com/react-native-unimodules/-/react-native-unimodules-0.9.0.tgz#5ce642ac50d124b9d41c09ff7cb397e22f1110ea\"\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | yarn.lock updates for background threads |
129,187 | 19.06.2020 16:05:57 | 14,400 | b7bcfad4d1089d1d788e6d8e452d2eadda7578b6 | [native] Don't persist frozen nav state in DEV mode | [
{
"change_type": "MODIFY",
"old_path": "native/root.react.js",
"new_path": "native/root.react.js",
"diff": "@@ -17,6 +17,7 @@ import AsyncStorage from '@react-native-community/async-storage';\nimport { NavigationContainer } from '@react-navigation/native';\nimport invariant from 'invariant';\nimport { SafeAreaProvider } from 'react-native-safe-area-context';\n+import PropTypes from 'prop-types';\nimport { connect } from 'lib/utils/redux-utils';\nimport { actionLogger } from 'lib/utils/action-logger';\n@@ -58,6 +59,7 @@ const navUnknownAction = Object.freeze({ type: 'NAV/@@UNKNOWN' });\ntype Props = {\n// Redux state\nactiveTheme: ?GlobalTheme,\n+ frozen: boolean,\n};\ntype State = {|\nnavContext: ?NavContextType,\n@@ -67,6 +69,7 @@ type State = {|\nclass Root extends React.PureComponent<Props, State> {\nstatic propTypes = {\nactiveTheme: globalThemePropType,\n+ frozen: PropTypes.bool.isRequired,\n};\nnavDispatch: ?(action: NavAction) => void;\nnavState: ?PossiblyStaleNavigationState;\n@@ -196,7 +199,7 @@ class Root extends React.PureComponent<Props, State> {\nactionLogger.addOtherAction('navState', action, prevState, state);\n}\n- if (__DEV__) {\n+ if (__DEV__ && !this.props.frozen) {\nthis.persistNavigationState(state);\n}\n};\n@@ -267,6 +270,7 @@ const styles = StyleSheet.create({\nconst ConnectedRoot = connect((state: AppState) => ({\nactiveTheme: state.globalThemeInfo.activeTheme,\n+ frozen: state.frozen,\n}))(Root);\nconst AppRoot = () => (\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Don't persist frozen nav state in DEV mode |
129,186 | 22.06.2020 18:06:00 | -7,200 | 7e54afc737352ebe384f62de559ab02aad1f8d3f | [server] Ignore flow errors about missing config files | [
{
"change_type": "MODIFY",
"old_path": "server/src/cron/backups.js",
"new_path": "server/src/cron/backups.js",
"diff": "@@ -20,6 +20,7 @@ async function importBackupConfig() {\nreturn importedBackupConfig;\n}\ntry {\n+ // $FlowFixMe\nconst backupExports = await import('../../facts/backups');\nif (importedBackupConfig === undefined) {\nimportedBackupConfig = backupExports.default;\n"
},
{
"change_type": "MODIFY",
"old_path": "server/src/cron/update-geoip-db.js",
"new_path": "server/src/cron/update-geoip-db.js",
"diff": "@@ -12,6 +12,7 @@ async function getGeoipLicense() {\nreturn cachedGeoipLicense;\n}\ntry {\n+ // $FlowFixMe\nconst geoipLicenseImport = await import('../../secrets/geoip_license');\nif (cachedGeoipLicense === undefined) {\ncachedGeoipLicense = geoipLicenseImport.default;\n"
},
{
"change_type": "MODIFY",
"old_path": "server/src/push/utils.js",
"new_path": "server/src/push/utils.js",
"diff": "@@ -14,6 +14,7 @@ async function getAPNProvider() {\nreturn cachedAPNProvider;\n}\ntry {\n+ // $FlowFixMe\nconst apnConfig = await import('../../secrets/apn_config');\nif (cachedAPNProvider === undefined) {\ncachedAPNProvider = new apn.Provider(apnConfig.default);\n@@ -32,6 +33,7 @@ async function initializeFCMApp() {\nreturn fcmAppInitialized;\n}\ntry {\n+ // $FlowFixMe\nconst fcmConfig = await import('../../secrets/fcm_config');\nif (fcmAppInitialized === undefined) {\nfcmAppInitialized = true;\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [server] Ignore flow errors about missing config files (#83) |
129,187 | 24.06.2020 08:23:06 | 14,400 | e187f39f0ddcc4026568da677e5086b5b99a3914 | [native] Don't count NULL membership row as 1 in rescindPushNotifs call in deleteThread | [
{
"change_type": "MODIFY",
"old_path": "server/src/deleters/thread-deleters.js",
"new_path": "server/src/deleters/thread-deleters.js",
"diff": "@@ -75,7 +75,7 @@ async function deleteThread(\nawait rescindPushNotifs(\nSQL`n.thread = ${threadID}`,\n- SQL`IF(m.thread = ${threadID}, NULL, 1)`,\n+ SQL`IF(m.thread = ${threadID}, NULL, m.thread)`,\n);\n// TODO: if org, delete all descendant threads as well. make sure to warn user\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Don't count NULL membership row as 1 in rescindPushNotifs call in deleteThread |
129,187 | 24.06.2020 08:39:52 | 14,400 | 3fffa75831a2b0ece90deca6c06842d9c0308533 | [server] Don't bother checking parent thread / secret statuts in deleteInaccessibleThreads
I was confused in
The code comment should clarify | [
{
"change_type": "MODIFY",
"old_path": "server/src/deleters/thread-deleters.js",
"new_path": "server/src/deleters/thread-deleters.js",
"diff": "import {\ntype ThreadDeletionRequest,\ntype LeaveThreadResult,\n- threadTypes,\nthreadPermissions,\n} from 'lib/types/thread-types';\nimport type { Viewer } from '../session/viewer';\n@@ -131,10 +130,9 @@ async function deleteThread(\n}\nasync function deleteInaccessibleThreads(): Promise<void> {\n- // A thread is considered \"inaccessible\" if it has no members and either has\n- // no parent or is a \"secret\" thread. In orgs where admins can see \"secret\"\n- // threads, an \"inaccessible\" thread may technically be accessible by an\n- // admin, but we will delete it anyways\n+ // A thread is considered \"inaccessible\" if it has no membership rows. Note\n+ // that membership rows exist whenever a user can see a thread, even if they\n+ // are not technically a member (in which case role=0)\nawait dbQuery(SQL`\nDELETE t, i, d, id, e, ie, re, ire, r, ir, ms, im, up, iu, f, n, ino\nFROM threads t\n@@ -155,8 +153,7 @@ async function deleteInaccessibleThreads(): Promise<void> {\nLEFT JOIN focused f ON f.thread = t.id\nLEFT JOIN notifications n ON n.thread = t.id\nLEFT JOIN ids ino ON ino.id = n.id\n- WHERE m.thread IS NULL AND\n- (t.parent_thread_id IS NULL OR t.type = ${threadTypes.CHAT_SECRET})\n+ WHERE m.thread IS NULL\n`);\n}\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [server] Don't bother checking parent thread / secret statuts in deleteInaccessibleThreads
I was confused in 7d235a2475f26abeab0a6de28a8b6df2a1ec4868
The code comment should clarify |
129,187 | 24.06.2020 12:33:26 | 14,400 | a92e496489bd6f2b030e27915bdd05a20882d655 | [lib] Don't list current user as a member if they're not
We always include the current user's membership row on the server because the client needs to know its own permissions.
But that doesn't mean we need to list the current user as a member in the UI. | [
{
"change_type": "MODIFY",
"old_path": "lib/selectors/user-selectors.js",
"new_path": "lib/selectors/user-selectors.js",
"diff": "@@ -6,10 +6,11 @@ import type {\nRelativeUserInfo,\nAccountUserInfo,\n} from '../types/user-types';\n-import type {\n- RawThreadInfo,\n- MemberInfo,\n- RelativeMemberInfo,\n+import {\n+ type RawThreadInfo,\n+ type MemberInfo,\n+ type RelativeMemberInfo,\n+ threadPermissions,\n} from '../types/thread-types';\nimport { createSelector } from 'reselect';\n@@ -67,7 +68,13 @@ const baseRelativeMemberInfoSelectorForMembersOfThread = (threadID: string) =>\nconst username = userInfos[memberInfo.id]\n? userInfos[memberInfo.id].username\n: null;\n- if (memberInfo.id === currentUserID) {\n+ const canChangeRoles =\n+ memberInfo.permissions[threadPermissions.CHANGE_ROLE] &&\n+ memberInfo.permissions[threadPermissions.CHANGE_ROLE].value;\n+ if (\n+ memberInfo.id === currentUserID &&\n+ (memberInfo.role || canChangeRoles)\n+ ) {\nrelativeMemberInfos.unshift({\nid: memberInfo.id,\nrole: memberInfo.role,\n@@ -75,7 +82,7 @@ const baseRelativeMemberInfoSelectorForMembersOfThread = (threadID: string) =>\nusername,\nisViewer: true,\n});\n- } else {\n+ } else if (memberInfo.id !== currentUserID) {\nrelativeMemberInfos.push({\nid: memberInfo.id,\nrole: memberInfo.role,\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [lib] Don't list current user as a member if they're not
We always include the current user's membership row on the server because the client needs to know its own permissions.
But that doesn't mean we need to list the current user as a member in the UI. |
129,187 | 24.06.2020 12:47:17 | 14,400 | 51c854ae8990ef43dde53654eae6c8006640d726 | [lib] Make sure thread-utils boolean checks return booleans | [
{
"change_type": "MODIFY",
"old_path": "lib/shared/thread-utils.js",
"new_path": "lib/shared/thread-utils.js",
"diff": "@@ -37,59 +37,60 @@ function generateRandomColor() {\nfunction threadHasPermission(\nthreadInfo: ?(ThreadInfo | RawThreadInfo),\npermission: ThreadPermission,\n-) {\n+): boolean {\nif (!threadInfo || !threadInfo.currentUser.permissions[permission]) {\nreturn false;\n}\nreturn threadInfo.currentUser.permissions[permission].value;\n}\n-function viewerIsMember(threadInfo: ?(ThreadInfo | RawThreadInfo)) {\n- return (\n+function viewerIsMember(threadInfo: ?(ThreadInfo | RawThreadInfo)): boolean {\n+ return !!(\nthreadInfo &&\nthreadInfo.currentUser.role !== null &&\nthreadInfo.currentUser.role !== undefined\n);\n}\n-function threadIsInHome(threadInfo: ?(ThreadInfo | RawThreadInfo)) {\n- return threadInfo && threadInfo.currentUser.subscription.home;\n+function threadIsInHome(threadInfo: ?(ThreadInfo | RawThreadInfo)): boolean {\n+ return !!(threadInfo && threadInfo.currentUser.subscription.home);\n}\n-function threadInChatList(threadInfo: ?(ThreadInfo | RawThreadInfo)) {\n+function threadInChatList(threadInfo: ?(ThreadInfo | RawThreadInfo)): boolean {\nreturn (\nviewerIsMember(threadInfo) &&\nthreadHasPermission(threadInfo, threadPermissions.VISIBLE)\n);\n}\n-function threadInBackgroundChatList(threadInfo: ?(ThreadInfo | RawThreadInfo)) {\n+function threadInBackgroundChatList(\n+ threadInfo: ?(ThreadInfo | RawThreadInfo),\n+): boolean {\nreturn threadInChatList(threadInfo) && !threadIsInHome(threadInfo);\n}\n-function threadInHomeChatList(threadInfo: ?(ThreadInfo | RawThreadInfo)) {\n+function threadInHomeChatList(\n+ threadInfo: ?(ThreadInfo | RawThreadInfo),\n+): boolean {\nreturn threadInChatList(threadInfo) && threadIsInHome(threadInfo);\n}\n-function threadInFilterList(threadInfo: ?(ThreadInfo | RawThreadInfo)) {\n+function threadInFilterList(\n+ threadInfo: ?(ThreadInfo | RawThreadInfo),\n+): boolean {\nreturn threadInChatList(threadInfo);\n}\nfunction userIsMember(\nthreadInfo: ?(ThreadInfo | RawThreadInfo),\nuserID: string,\n-) {\n+): boolean {\nif (!threadInfo) {\nreturn false;\n}\n- return (\n- threadInfo &&\n- threadInfo.members.some(\n+ return threadInfo.members.some(\nmember =>\n- member.id === userID &&\n- member.role !== null &&\n- member.role !== undefined,\n- )\n+ member.id === userID && member.role !== null && member.role !== undefined,\n);\n}\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [lib] Make sure thread-utils boolean checks return booleans |
129,187 | 24.06.2020 12:49:29 | 14,400 | f539af9e17d73a6e8ae91db3ed5e1524741a1533 | [native] Don't show subscription in ThreadSettings if you're not a member | [
{
"change_type": "MODIFY",
"old_path": "native/chat/chat-thread-list.react.js",
"new_path": "native/chat/chat-thread-list.react.js",
"diff": "@@ -190,8 +190,6 @@ class ChatThreadList extends React.PureComponent<Props, State> {\n}\nrender() {\n- // this.props.viewerID is in extraData since it's used by MessagePreview\n- // within ChatThreadListItem\nlet floatingAction = null;\nif (Platform.OS === 'android') {\nfloatingAction = (\n@@ -203,6 +201,8 @@ class ChatThreadList extends React.PureComponent<Props, State> {\n/>\n);\n}\n+ // this.props.viewerID is in extraData since it's used by MessagePreview\n+ // within ChatThreadListItem\nreturn (\n<View style={this.props.styles.container}>\n<FlatList\n"
},
{
"change_type": "MODIFY",
"old_path": "native/chat/settings/thread-settings.react.js",
"new_path": "native/chat/settings/thread-settings.react.js",
"diff": "@@ -408,6 +408,8 @@ class ThreadSettings extends React.PureComponent<Props, State> {\n});\n}\n+ const isMember = viewerIsMember(threadInfo);\n+ if (isMember) {\nlistData.push({\nitemType: 'header',\nkey: 'subscriptionHeader',\n@@ -429,6 +431,7 @@ class ThreadSettings extends React.PureComponent<Props, State> {\nkey: 'subscriptionFooter',\ncategoryType: 'full',\n});\n+ }\nlistData.push({\nitemType: 'header',\n@@ -582,12 +585,11 @@ class ThreadSettings extends React.PureComponent<Props, State> {\n});\n}\n- const canLeaveThread = viewerIsMember(threadInfo);\nconst canDeleteThread = threadHasPermission(\nthreadInfo,\nthreadPermissions.DELETE_THREAD,\n);\n- if (canLeaveThread || canDeleteThread) {\n+ if (isMember || canDeleteThread) {\nlistData.push({\nitemType: 'header',\nkey: 'actionsHeader',\n@@ -595,12 +597,12 @@ class ThreadSettings extends React.PureComponent<Props, State> {\ncategoryType: 'unpadded',\n});\n}\n- if (canLeaveThread) {\n+ if (isMember) {\nlistData.push({\nitemType: 'leaveThread',\nkey: 'leaveThread',\nthreadInfo,\n- canDeleteThread: !!canDeleteThread,\n+ canDeleteThread,\n});\n}\nif (canDeleteThread) {\n@@ -609,10 +611,10 @@ class ThreadSettings extends React.PureComponent<Props, State> {\nkey: 'deleteThread',\nthreadInfo,\nnavigate,\n- canLeaveThread: !!canLeaveThread,\n+ canLeaveThread: isMember,\n});\n}\n- if (canLeaveThread || canDeleteThread) {\n+ if (isMember || canDeleteThread) {\nlistData.push({\nitemType: 'footer',\nkey: 'actionsFooter',\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Don't show subscription in ThreadSettings if you're not a member |
129,183 | 25.06.2020 14:07:59 | -7,200 | b6c7a4950d65ddba279a2cd268526b9bfd2a8252 | [native] Rename"Home notifs" to "Background" and invert the value | [
{
"change_type": "MODIFY",
"old_path": "native/chat/settings/thread-settings-home-notifs.react.js",
"new_path": "native/chat/settings/thread-settings-home-notifs.react.js",
"diff": "@@ -45,14 +45,14 @@ class ThreadSettingsHomeNotifs extends React.PureComponent<Props, State> {\nconstructor(props: Props) {\nsuper(props);\nthis.state = {\n- currentValue: props.threadInfo.currentUser.subscription.home,\n+ currentValue: !props.threadInfo.currentUser.subscription.home,\n};\n}\nrender() {\nreturn (\n<View style={this.props.styles.row}>\n- <Text style={this.props.styles.label}>Home notifs</Text>\n+ <Text style={this.props.styles.label}>Background</Text>\n<View style={this.props.styles.currentValue}>\n<Switch\nvalue={this.state.currentValue}\n@@ -70,7 +70,7 @@ class ThreadSettingsHomeNotifs extends React.PureComponent<Props, State> {\nthis.props.updateSubscription({\nthreadID: this.props.threadInfo.id,\nupdatedFields: {\n- home: value,\n+ home: !value,\n},\n}),\n);\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Rename"Home notifs" to "Background" and invert the value (#90) |
129,187 | 25.06.2020 08:28:03 | 14,400 | 5c9ea135d9836eabb4cb6f4373c1fe544c2e88b3 | [native] Only set createThreadPressed in ComposeThread when dispatching action | [
{
"change_type": "MODIFY",
"old_path": "native/chat/compose-thread.react.js",
"new_path": "native/chat/compose-thread.react.js",
"diff": "@@ -354,7 +354,6 @@ class ComposeThread extends React.PureComponent<Props, State> {\nif (this.createThreadPressed) {\nreturn;\n}\n- this.createThreadPressed = true;\nif (this.state.userInfoInputArray.length === 0) {\nAlert.alert(\n'Chatting to yourself?',\n@@ -370,6 +369,7 @@ class ComposeThread extends React.PureComponent<Props, State> {\n};\ndispatchNewChatThreadAction = async () => {\n+ this.createThreadPressed = true;\nconst promise = this.newChatThreadAction();\nthis.props.dispatchActionPromise(newThreadActionTypes, promise);\nconst { newThreadInfo: rawThreadInfo } = await promise;\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Only set createThreadPressed in ComposeThread when dispatching action |
129,187 | 26.06.2020 08:46:18 | 14,400 | c769b592253409a8cbe0b8e628f619973cf297cf | [native] Update React Navigation
Also installed for the first time | [
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js",
"diff": "-// flow-typed signature: cda2e1070bd5c208e1fcf2ea5754e687\n-// flow-typed version: ecee683170/@react-navigation/bottom-tabs_v5.x.x/flow_>=v0.104.x\n+// flow-typed signature: 5db79e4115d62b6c8a81decff8bfe4d5\n+// flow-typed version: bfbf5a5401/@react-navigation/bottom-tabs_v5.x.x/flow_>=v0.104.x\ndeclare module '@react-navigation/bottom-tabs' {\n@@ -1227,7 +1227,7 @@ declare module '@react-navigation/bottom-tabs' {\n+headerTintColor: string,\n+headerTitleAllowFontScaling: boolean,\n+headerBackAllowFontScaling: boolean,\n- +headerBackTitle: string,\n+ +headerBackTitle: string | null,\n+headerBackTitleStyle: TextStyleProp,\n+headerBackTitleVisible: boolean,\n+headerTruncatedBackTitle: string,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/core_v5.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/core_v5.x.x.js",
"diff": "-// flow-typed signature: c6b613396e54f513d277ef7bfe8c82da\n-// flow-typed version: ecee683170/@react-navigation/core_v5.x.x/flow_>=v0.104.x\n+// flow-typed signature: 317b5e100e4c74e04a4dfe2a1951c0bd\n+// flow-typed version: bfbf5a5401/@react-navigation/core_v5.x.x/flow_>=v0.104.x\ndeclare module '@react-navigation/core' {\n@@ -1227,7 +1227,7 @@ declare module '@react-navigation/core' {\n+headerTintColor: string,\n+headerTitleAllowFontScaling: boolean,\n+headerBackAllowFontScaling: boolean,\n- +headerBackTitle: string,\n+ +headerBackTitle: string | null,\n+headerBackTitleStyle: TextStyleProp,\n+headerBackTitleVisible: boolean,\n+headerTruncatedBackTitle: string,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js",
"diff": "-// flow-typed signature: 810b43b04ec962bd02054f1b6ff4946b\n-// flow-typed version: ecee683170/@react-navigation/material-top-tabs_v5.x.x/flow_>=v0.104.x\n+// flow-typed signature: 25d9e2c3ba02a654f1abcd4aedbc8013\n+// flow-typed version: bfbf5a5401/@react-navigation/material-top-tabs_v5.x.x/flow_>=v0.104.x\ndeclare module '@react-navigation/material-top-tabs' {\n@@ -1227,7 +1227,7 @@ declare module '@react-navigation/material-top-tabs' {\n+headerTintColor: string,\n+headerTitleAllowFontScaling: boolean,\n+headerBackAllowFontScaling: boolean,\n- +headerBackTitle: string,\n+ +headerBackTitle: string | null,\n+headerBackTitleStyle: TextStyleProp,\n+headerBackTitleVisible: boolean,\n+headerTruncatedBackTitle: string,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js",
"diff": "-// flow-typed signature: 29924eb8e26fde756f5fb3e95110620f\n-// flow-typed version: ecee683170/@react-navigation/native_v5.x.x/flow_>=v0.104.x\n+// flow-typed signature: 4cba30a0852c70be641985ded940055f\n+// flow-typed version: bfbf5a5401/@react-navigation/native_v5.x.x/flow_>=v0.104.x\ndeclare module '@react-navigation/native' {\n@@ -1227,7 +1227,7 @@ declare module '@react-navigation/native' {\n+headerTintColor: string,\n+headerTitleAllowFontScaling: boolean,\n+headerBackAllowFontScaling: boolean,\n- +headerBackTitle: string,\n+ +headerBackTitle: string | null,\n+headerBackTitleStyle: TextStyleProp,\n+headerBackTitleVisible: boolean,\n+headerTruncatedBackTitle: string,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js",
"new_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js",
"diff": "-// flow-typed signature: adaa100b411117a447158bc40021cd46\n-// flow-typed version: ecee683170/@react-navigation/stack_v5.x.x/flow_>=v0.104.x\n+// flow-typed signature: ccb7ea984772b11e89185bbfecd7656d\n+// flow-typed version: bfbf5a5401/@react-navigation/stack_v5.x.x/flow_>=v0.104.x\ndeclare module '@react-navigation/stack' {\n@@ -1227,7 +1227,7 @@ declare module '@react-navigation/stack' {\n+headerTintColor: string,\n+headerTitleAllowFontScaling: boolean,\n+headerBackAllowFontScaling: boolean,\n- +headerBackTitle: string,\n+ +headerBackTitle: string | null,\n+headerBackTitleStyle: TextStyleProp,\n+headerBackTitleVisible: boolean,\n+headerTruncatedBackTitle: string,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/ios/Podfile.lock",
"new_path": "native/ios/Podfile.lock",
"diff": "@@ -248,7 +248,7 @@ PODS:\n- React\n- react-native-orientation-locker (1.1.6):\n- React\n- - react-native-safe-area-context (3.0.2):\n+ - react-native-safe-area-context (3.0.6):\n- React\n- react-native-video/Video (5.0.2):\n- React\n@@ -318,7 +318,7 @@ PODS:\n- React\n- RNReanimated (1.9.0):\n- React\n- - RNScreens (2.7.0):\n+ - RNScreens (2.9.0):\n- React\n- RNVectorIcons (6.6.0):\n- React\n@@ -628,7 +628,7 @@ SPEC CHECKSUMS:\nreact-native-notifications: bb042206ac7eab9323d528c780b3d6fe796c1f5e\nreact-native-onepassword: 5b2b7f425f9db40932703e65d350b78cbc598047\nreact-native-orientation-locker: 23918c400376a7043e752c639c122fcf6bce8f1c\n- react-native-safe-area-context: b11a34881faac509cad5578726c98161ad4d275c\n+ react-native-safe-area-context: e22a8ca00f758273d2408953965cb8db67da7925\nreact-native-video: d01ed7ff1e38fa7dcc6c15c94cf505e661b7bfd0\nReact-RCTActionSheet: 600b4d10e3aea0913b5a92256d2719c0cdd26d76\nReact-RCTAnimation: 791a87558389c80908ed06cc5dfc5e7920dfa360\n@@ -652,7 +652,7 @@ SPEC CHECKSUMS:\nRNGestureHandler: 8f09cd560f8d533eb36da5a6c5a843af9f056b38\nRNKeychain: 45dbd50d1ac4bd42c3740f76ffb135abf05746d0\nRNReanimated: b5ccb50650ba06f6e749c7c329a1bc3ae0c88b43\n- RNScreens: cf198f915f8a2bf163de94ca9f5bfc8d326c3706\n+ RNScreens: c526239bbe0e957b988dacc8d75ac94ec9cb19da\nRNVectorIcons: 0bb4def82230be1333ddaeee9fcba45f0b288ed4\nSDWebImage: d9ea4959d99c52276dfada481987018fcaea3d58\nSDWebImageWebPCoder: 947093edd1349d820c40afbd9f42acb6cdecd987\n"
},
{
"change_type": "MODIFY",
"old_path": "native/package.json",
"new_path": "native/package.json",
"diff": "\"@react-native-community/cameraroll\": \"^1.5.2\",\n\"@react-native-community/masked-view\": \"^0.1.10\",\n\"@react-native-community/netinfo\": \"^4.4.0\",\n- \"@react-navigation/bottom-tabs\": \"^5.5.2\",\n- \"@react-navigation/material-top-tabs\": \"^5.2.9\",\n- \"@react-navigation/native\": \"^5.5.1\",\n- \"@react-navigation/stack\": \"^5.4.2\",\n+ \"@react-navigation/bottom-tabs\": \"^5.6.1\",\n+ \"@react-navigation/devtools\": \"^5.1.1\",\n+ \"@react-navigation/material-top-tabs\": \"^5.2.12\",\n+ \"@react-navigation/native\": \"^5.6.1\",\n+ \"@react-navigation/stack\": \"^5.6.2\",\n\"base-64\": \"^0.1.0\",\n\"expo-image-manipulator\": \"^8.1.0\",\n\"expo-media-library\": \"^8.2.1\",\n\"react-native-orientation-locker\": \"^1.1.6\",\n\"react-native-progress\": \"^4.0.3\",\n\"react-native-reanimated\": \"^1.9.0\",\n- \"react-native-safe-area-context\": \"^3.0.2\",\n- \"react-native-screens\": \"^2.7.0\",\n+ \"react-native-safe-area-context\": \"^3.0.6\",\n+ \"react-native-screens\": \"^2.9.0\",\n\"react-native-tab-view\": \"^2.14.4\",\n\"react-native-unimodules\": \"^0.9.0\",\n\"react-native-vector-icons\": \"^6.6.0\",\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "resolved \"https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-4.4.0.tgz#a18eb9ba082b6aca6add004b4a918250ad7d13bc\"\nintegrity sha512-qqNWMOsrDjj/daqV21ID2T8mNUjZD4pdx3PuWyE65gzKh2w+oMnzKb+J0NbLyZPn3wwLwU1+Cpf58A0ff5szjQ==\n-\"@react-navigation/bottom-tabs@^5.5.2\":\n- version \"5.5.2\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/bottom-tabs/-/bottom-tabs-5.5.2.tgz#b3d95e2a05eba47f7aa34fb9f2331ddede0ee4d5\"\n- integrity sha512-unopBnv8i3hcjhp2qdhgSwF6GFnhkdtPwGbvJMOG8Na19oPscT8UQDUbHZKs9wiJMk2Q0usEz2PbFh8GQGAf7w==\n+\"@react-navigation/bottom-tabs@^5.6.1\":\n+ version \"5.6.1\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/bottom-tabs/-/bottom-tabs-5.6.1.tgz#f4aa23913a0c26ec3dd4dc268cd83e3d0e5f4dc4\"\n+ integrity sha512-aAqA4lCaa1x3cEWwEyUJ5hBPpVuv/TR0Q0Y/hkBgI2+h27Xdv9B/ZemMIjMWTNDZTjbYXTsJ41AJbVQnPSVTrg==\ndependencies:\ncolor \"^3.1.2\"\nreact-native-iphone-x-helper \"^1.2.1\"\n-\"@react-navigation/core@^5.10.0\":\n- version \"5.10.0\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/core/-/core-5.10.0.tgz#aee9e22a5f0f458ebeadc155f347b13eb5ff5212\"\n- integrity sha512-cVQTj5FtZHWuymjZMP50RVXYpkQUbo1zQPjxJl+UfBUh7u9nKexknajBhjYbZq61uDE4MmPE8qAqIEJHKeR4Hg==\n+\"@react-navigation/core@^5.11.1\":\n+ version \"5.11.1\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/core/-/core-5.11.1.tgz#c4890910ba3d6332ee6873f0adb3d3d13cf4fa4c\"\n+ integrity sha512-zJ/w84msKBhgRR35/tHdY1facxdnN/WP9Ebutnjp/J9ENuv7fHXhYlxX+oIRrMn+/MnbG79RVnYcO/r4lO8OTQ==\ndependencies:\n- \"@react-navigation/routers\" \"^5.4.7\"\n+ \"@react-navigation/routers\" \"^5.4.8\"\nescape-string-regexp \"^4.0.0\"\n- nanoid \"^3.1.5\"\n- query-string \"^6.12.1\"\n+ nanoid \"^3.1.9\"\n+ query-string \"^6.13.1\"\nreact-is \"^16.13.0\"\nuse-subscription \"^1.4.0\"\n-\"@react-navigation/material-top-tabs@^5.2.9\":\n- version \"5.2.10\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/material-top-tabs/-/material-top-tabs-5.2.10.tgz#6144217267253fb889d55ba91344832223322e63\"\n- integrity sha512-CSvX6+9fzi662OXgVRsBe7xiqxmOyHu7S5YWYq0nlTFzdNTov+/JAXe/gRY/N6O6fGNIPBQvp4Y82pWsTG7FPA==\n+\"@react-navigation/devtools@^5.1.1\":\n+ version \"5.1.1\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/devtools/-/devtools-5.1.1.tgz#e4fbbf919c9808cefb243c85187fddfd29a2eae3\"\n+ integrity sha512-Z/hjKzJGAtrY7fATYEPH4EGuvdG+Ywh1fl8uYgFJGTfv3leDF+fJ4+vRW0k0cp+0LzTsCJQk6NNuUiGenZdp0w==\n+ dependencies:\n+ \"@react-navigation/core\" \"^5.11.1\"\n+ deep-equal \"^2.0.3\"\n+\n+\"@react-navigation/material-top-tabs@^5.2.12\":\n+ version \"5.2.12\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/material-top-tabs/-/material-top-tabs-5.2.12.tgz#a9d1bc6b0446cb37cc24774c6db409ded38beb84\"\n+ integrity sha512-q1Rb/yo94+2TAQO29XZVJyWB5xhY2WKEVtXFjbtHGHl3q5ijerBXHkIt7akdkE00z5Jn9Ir5JJAmeyx6uWtVmg==\ndependencies:\ncolor \"^3.1.2\"\n-\"@react-navigation/native@^5.5.1\":\n- version \"5.5.1\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/native/-/native-5.5.1.tgz#e669d9561e54d86b1315637b8d5630dc55ee9383\"\n- integrity sha512-5pzsfvLdnvqfrWgTMCLDFaGK6Sj30p7tAMhUGneV2oGlx0OIbhgc6/04UUMpKEmAS2PaC/GZa1LQIsSVWDewvw==\n+\"@react-navigation/native@^5.6.1\":\n+ version \"5.6.1\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/native/-/native-5.6.1.tgz#a603b921f39fe3fcfcc27232d71b24e80effc1f2\"\n+ integrity sha512-jnSNEnuRzqLvG+7QcMthfB8eCZIzAE0Wku7HDgzfjFS2iA7Oa9ugeX/1qdP9heT2Mp0t9BDQ4XX4boJma9Z/xg==\ndependencies:\n- \"@react-navigation/core\" \"^5.10.0\"\n+ \"@react-navigation/core\" \"^5.11.1\"\nnanoid \"^3.1.9\"\n-\"@react-navigation/routers@^5.4.7\":\n- version \"5.4.7\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/routers/-/routers-5.4.7.tgz#05f85a099d7ee5677edeced98959e4b87562e3b5\"\n- integrity sha512-J+lQYDbEsyhAjcPpWY6ZJYEkGiZcPX62hNtySruShjbIEnI9gm3rC+BHdcrP/lufeWxWGFhI8CN7NSJGgP/Nmg==\n+\"@react-navigation/routers@^5.4.8\":\n+ version \"5.4.8\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/routers/-/routers-5.4.8.tgz#b85ba06b2465bfa031d61167c078c2911219d877\"\n+ integrity sha512-7uxC24fgLQdRquxPfL8SZ8zjle5DXdAB56aYL13tH+HAdhO2YxjKVvulzhGUsfcZthMvZ/9psybhn+m4z71dUg==\ndependencies:\n- nanoid \"^3.1.5\"\n+ nanoid \"^3.1.9\"\n-\"@react-navigation/stack@^5.4.2\":\n- version \"5.4.2\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/stack/-/stack-5.4.2.tgz#ca4e77e8ab55b446e44f656068702825ec3b29d3\"\n- integrity sha512-EG8DqHsfg257XeNaO6MIeAnPClekmr8po3PYikezyXon02rJUmHU4px25/PWOvh1hTFiH40W4WYBKzrzMBFaOQ==\n+\"@react-navigation/stack@^5.6.2\":\n+ version \"5.6.2\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/stack/-/stack-5.6.2.tgz#d2371f9ffdcf3eee26245697d0947c9722542f38\"\n+ integrity sha512-51Aasxg8j2eKxz4mhA0ajJXrhAyJQkk2iiNE511zcqJ3tlfxv/h70Eej3PetnbbHFMOwNsEwc2GjB3OnfQcxjQ==\ndependencies:\ncolor \"^3.1.2\"\nreact-native-iphone-x-helper \"^1.2.1\"\n@@ -3040,6 +3048,11 @@ array-equal@^1.0.0:\nresolved \"https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93\"\nintegrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=\n+array-filter@^1.0.0:\n+ version \"1.0.0\"\n+ resolved \"https://registry.yarnpkg.com/array-filter/-/array-filter-1.0.0.tgz#baf79e62e6ef4c2a4c0b831232daffec251f9d83\"\n+ integrity sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=\n+\narray-filter@~0.0.0:\nversion \"0.0.1\"\nresolved \"https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec\"\n@@ -3208,6 +3221,13 @@ atob@^2.1.1:\nresolved \"https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9\"\nintegrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==\n+available-typed-arrays@^1.0.0, available-typed-arrays@^1.0.2:\n+ version \"1.0.2\"\n+ resolved \"https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz#6b098ca9d8039079ee3f77f7b783c4480ba513f5\"\n+ integrity sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==\n+ dependencies:\n+ array-filter \"^1.0.0\"\n+\naws-sign2@~0.7.0:\nversion \"0.7.0\"\nresolved \"https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8\"\n@@ -4960,6 +4980,26 @@ deep-equal@^1.0.1:\nobject-keys \"^1.1.1\"\nregexp.prototype.flags \"^1.2.0\"\n+deep-equal@^2.0.3:\n+ version \"2.0.3\"\n+ resolved \"https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.0.3.tgz#cad1c15277ad78a5c01c49c2dee0f54de8a6a7b0\"\n+ integrity sha512-Spqdl4H+ky45I9ByyJtXteOm9CaIrPmnIPmOhrkKGNYWeDgCvJ8jNYVCTjChxW4FqGuZnLHADc8EKRMX6+CgvA==\n+ dependencies:\n+ es-abstract \"^1.17.5\"\n+ es-get-iterator \"^1.1.0\"\n+ is-arguments \"^1.0.4\"\n+ is-date-object \"^1.0.2\"\n+ is-regex \"^1.0.5\"\n+ isarray \"^2.0.5\"\n+ object-is \"^1.1.2\"\n+ object-keys \"^1.1.1\"\n+ object.assign \"^4.1.0\"\n+ regexp.prototype.flags \"^1.3.0\"\n+ side-channel \"^1.0.2\"\n+ which-boxed-primitive \"^1.0.1\"\n+ which-collection \"^1.0.1\"\n+ which-typed-array \"^1.1.2\"\n+\ndeep-extend@^0.6.0:\nversion \"0.6.0\"\nresolved \"https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac\"\n@@ -5454,6 +5494,36 @@ es-abstract@^1.17.0, es-abstract@^1.17.0-next.1:\nstring.prototype.trimleft \"^2.1.1\"\nstring.prototype.trimright \"^2.1.1\"\n+es-abstract@^1.17.4, es-abstract@^1.17.5:\n+ version \"1.17.6\"\n+ resolved \"https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.6.tgz#9142071707857b2cacc7b89ecb670316c3e2d52a\"\n+ integrity sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==\n+ dependencies:\n+ es-to-primitive \"^1.2.1\"\n+ function-bind \"^1.1.1\"\n+ has \"^1.0.3\"\n+ has-symbols \"^1.0.1\"\n+ is-callable \"^1.2.0\"\n+ is-regex \"^1.1.0\"\n+ object-inspect \"^1.7.0\"\n+ object-keys \"^1.1.1\"\n+ object.assign \"^4.1.0\"\n+ string.prototype.trimend \"^1.0.1\"\n+ string.prototype.trimstart \"^1.0.1\"\n+\n+es-get-iterator@^1.1.0:\n+ version \"1.1.0\"\n+ resolved \"https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.0.tgz#bb98ad9d6d63b31aacdc8f89d5d0ee57bcb5b4c8\"\n+ integrity sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==\n+ dependencies:\n+ es-abstract \"^1.17.4\"\n+ has-symbols \"^1.0.1\"\n+ is-arguments \"^1.0.4\"\n+ is-map \"^2.0.1\"\n+ is-set \"^2.0.1\"\n+ is-string \"^1.0.5\"\n+ isarray \"^2.0.5\"\n+\nes-to-primitive@^1.2.0:\nversion \"1.2.0\"\nresolved \"https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377\"\n@@ -6399,6 +6469,11 @@ foreach@2.0.4:\nresolved \"https://registry.yarnpkg.com/foreach/-/foreach-2.0.4.tgz#cc5d0d8ae1d46cc9a555c2682f910977859935df\"\nintegrity sha1-zF0NiuHUbMmlVcJoL5EJd4WZNd8=\n+foreach@^2.0.5:\n+ version \"2.0.5\"\n+ resolved \"https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99\"\n+ integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k=\n+\nforever-agent@~0.6.1:\nversion \"0.6.1\"\nresolved \"https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91\"\n@@ -7598,6 +7673,11 @@ is-arrayish@^0.3.1:\nresolved \"https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03\"\nintegrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==\n+is-bigint@^1.0.0:\n+ version \"1.0.0\"\n+ resolved \"https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.0.tgz#73da8c33208d00f130e9b5e15d23eac9215601c4\"\n+ integrity sha512-t5mGUXC/xRheCK431ylNiSkGGpBp8bHENBcENTkDT6ppwPzEVxNGZRvgvmOEfbWkFhA7D2GEuE2mmQTr78sl2g==\n+\nis-binary-path@^1.0.0:\nversion \"1.0.1\"\nresolved \"https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898\"\n@@ -7612,6 +7692,11 @@ is-binary-path@^2.1.0:\ndependencies:\nbinary-extensions \"^2.0.0\"\n+is-boolean-object@^1.0.0:\n+ version \"1.0.1\"\n+ resolved \"https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.0.1.tgz#10edc0900dd127697a92f6f9807c7617d68ac48e\"\n+ integrity sha512-TqZuVwa/sppcrhUCAYkGBk7w0yxfQQnxq28fjkO53tnK9FQXmdwz2JS5+GjsWQ6RByES1K40nI+yDic5c9/aAQ==\n+\nis-buffer@^1.1.5, is-buffer@~1.1.1:\nversion \"1.1.6\"\nresolved \"https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be\"\n@@ -7627,6 +7712,11 @@ is-callable@^1.1.5:\nresolved \"https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab\"\nintegrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==\n+is-callable@^1.2.0:\n+ version \"1.2.0\"\n+ resolved \"https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.0.tgz#83336560b54a38e35e3a2df7afd0454d691468bb\"\n+ integrity sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==\n+\nis-ci@^1.0.10:\nversion \"1.2.1\"\nresolved \"https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c\"\n@@ -7672,6 +7762,11 @@ is-date-object@^1.0.1:\nresolved \"https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16\"\nintegrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=\n+is-date-object@^1.0.2:\n+ version \"1.0.2\"\n+ resolved \"https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e\"\n+ integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==\n+\nis-descriptor@^0.1.0:\nversion \"0.1.6\"\nresolved \"https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca\"\n@@ -7761,6 +7856,11 @@ is-interactive@^1.0.0:\nresolved \"https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e\"\nintegrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==\n+is-map@^2.0.1:\n+ version \"2.0.1\"\n+ resolved \"https://registry.yarnpkg.com/is-map/-/is-map-2.0.1.tgz#520dafc4307bb8ebc33b813de5ce7c9400d644a1\"\n+ integrity sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==\n+\nis-nan@^1.2.1:\nversion \"1.2.1\"\nresolved \"https://registry.yarnpkg.com/is-nan/-/is-nan-1.2.1.tgz#9faf65b6fb6db24b7f5c0628475ea71f988401e2\"\n@@ -7773,6 +7873,11 @@ is-npm@^1.0.0:\nresolved \"https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4\"\nintegrity sha1-8vtjpl5JBbQGyGBydloaTceTufQ=\n+is-number-object@^1.0.3:\n+ version \"1.0.4\"\n+ resolved \"https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.4.tgz#36ac95e741cf18b283fc1ddf5e83da798e3ec197\"\n+ integrity sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==\n+\nis-number@^3.0.0:\nversion \"3.0.0\"\nresolved \"https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195\"\n@@ -7874,6 +7979,13 @@ is-regex@^1.0.5:\ndependencies:\nhas \"^1.0.3\"\n+is-regex@^1.1.0:\n+ version \"1.1.0\"\n+ resolved \"https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.0.tgz#ece38e389e490df0dc21caea2bd596f987f767ff\"\n+ integrity sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==\n+ dependencies:\n+ has-symbols \"^1.0.1\"\n+\nis-regexp@^1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069\"\n@@ -7889,6 +8001,11 @@ is-retry-allowed@^1.0.0, is-retry-allowed@^1.1.0:\nresolved \"https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4\"\nintegrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==\n+is-set@^2.0.1:\n+ version \"2.0.1\"\n+ resolved \"https://registry.yarnpkg.com/is-set/-/is-set-2.0.1.tgz#d1604afdab1724986d30091575f54945da7e5f43\"\n+ integrity sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==\n+\nis-stream-ended@^0.1.4:\nversion \"0.1.4\"\nresolved \"https://registry.yarnpkg.com/is-stream-ended/-/is-stream-ended-0.1.4.tgz#f50224e95e06bce0e356d440a4827cd35b267eda\"\n@@ -7904,7 +8021,7 @@ is-stream@^2.0.0:\nresolved \"https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3\"\nintegrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==\n-is-string@^1.0.5:\n+is-string@^1.0.4, is-string@^1.0.5:\nversion \"1.0.5\"\nresolved \"https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6\"\nintegrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==\n@@ -7930,11 +8047,31 @@ is-symbol@^1.0.2:\ndependencies:\nhas-symbols \"^1.0.0\"\n+is-typed-array@^1.1.3:\n+ version \"1.1.3\"\n+ resolved \"https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.3.tgz#a4ff5a5e672e1a55f99c7f54e59597af5c1df04d\"\n+ integrity sha512-BSYUBOK/HJibQ30wWkWold5txYwMUXQct9YHAQJr8fSwvZoiglcqB0pd7vEN23+Tsi9IUEjztdOSzl4qLVYGTQ==\n+ dependencies:\n+ available-typed-arrays \"^1.0.0\"\n+ es-abstract \"^1.17.4\"\n+ foreach \"^2.0.5\"\n+ has-symbols \"^1.0.1\"\n+\nis-typedarray@^1.0.0, is-typedarray@~1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a\"\nintegrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=\n+is-weakmap@^2.0.1:\n+ version \"2.0.1\"\n+ resolved \"https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2\"\n+ integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==\n+\n+is-weakset@^2.0.1:\n+ version \"2.0.1\"\n+ resolved \"https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.1.tgz#e9a0af88dbd751589f5e50d80f4c98b780884f83\"\n+ integrity sha512-pi4vhbhVHGLxohUw7PhGsueT4vRGFoXhP7+RGN0jKIv9+8PWYCQTqtADngrxOm2g46hoH0+g8uZZBzMrvVGDmw==\n+\nis-windows@^1.0.1, is-windows@^1.0.2:\nversion \"1.0.2\"\nresolved \"https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d\"\n@@ -7955,6 +8092,11 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0:\nresolved \"https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11\"\nintegrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=\n+isarray@^2.0.5:\n+ version \"2.0.5\"\n+ resolved \"https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723\"\n+ integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==\n+\nisexe@^2.0.0:\nversion \"2.0.0\"\nresolved \"https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10\"\n@@ -9872,11 +10014,6 @@ nan@^2.12.1:\nresolved \"https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c\"\nintegrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==\n-nanoid@^3.1.5:\n- version \"3.1.6\"\n- resolved \"https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.6.tgz#f591cc886c14e5b2c4da753db0ac547fac1fee6a\"\n- integrity sha512-Kp/sUTkDjStVFvT4W0OO1Z1jJWhnxIa1TNJ1F+G27IPC+FOc3aqbX8OMptcZE4vRrzREjttOHut5PbC11F7KBQ==\n-\nnanoid@^3.1.9:\nversion \"3.1.9\"\nresolved \"https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.9.tgz#1f148669c70bb2072dc5af0666e46edb6cd31fb2\"\n@@ -10265,6 +10402,14 @@ object-is@^1.0.1:\nresolved \"https://registry.yarnpkg.com/object-is/-/object-is-1.0.1.tgz#0aa60ec9989a0b3ed795cf4d06f62cf1ad6539b6\"\nintegrity sha1-CqYOyZiaCz7Xlc9NBvYs8a1lObY=\n+object-is@^1.1.2:\n+ version \"1.1.2\"\n+ resolved \"https://registry.yarnpkg.com/object-is/-/object-is-1.1.2.tgz#c5d2e87ff9e119f78b7a088441519e2eec1573b6\"\n+ integrity sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ==\n+ dependencies:\n+ define-properties \"^1.1.3\"\n+ es-abstract \"^1.17.5\"\n+\nobject-keys@0.5.0:\nversion \"0.5.0\"\nresolved \"https://registry.yarnpkg.com/object-keys/-/object-keys-0.5.0.tgz#09e211f3e00318afc4f592e36e7cdc10d9ad7293\"\n@@ -11586,10 +11731,10 @@ query-string@^5.0.1:\nobject-assign \"^4.1.0\"\nstrict-uri-encode \"^1.0.0\"\n-query-string@^6.12.1:\n- version \"6.12.1\"\n- resolved \"https://registry.yarnpkg.com/query-string/-/query-string-6.12.1.tgz#2ae4d272db4fba267141665374e49a1de09e8a7c\"\n- integrity sha512-OHj+zzfRMyj3rmo/6G8a5Ifvw3AleL/EbcHMD27YA31Q+cO5lfmQxECkImuNVjcskLcvBRVHNAB3w6udMs1eAA==\n+query-string@^6.13.1:\n+ version \"6.13.1\"\n+ resolved \"https://registry.yarnpkg.com/query-string/-/query-string-6.13.1.tgz#d913ccfce3b4b3a713989fe6d39466d92e71ccad\"\n+ integrity sha512-RfoButmcK+yCta1+FuU8REvisx1oEzhMKwhLUNcepQTPGcNMp1sIqjnfCtfnvGSQZQEhaBHvccujtWoUV3TTbA==\ndependencies:\ndecode-uri-component \"^0.2.0\"\nsplit-on-first \"^1.0.0\"\n@@ -11891,10 +12036,10 @@ react-native-reanimated@^1.9.0:\ndependencies:\nfbjs \"^1.0.0\"\n-react-native-safe-area-context@^3.0.2:\n- version \"3.0.2\"\n- resolved \"https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-3.0.2.tgz#95dd7e56bc89bcc4f3f7bb5fada30c98420328b2\"\n- integrity sha512-x3yVMsxwe9GyvIkv0Q5jy2CWYN7VO0/CJTFGG5kSiMo8FFTQJbWtuWGANFqxDzEH5NEV7/SfK+qTgAh931KyUw==\n+react-native-safe-area-context@^3.0.6:\n+ version \"3.0.6\"\n+ resolved \"https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-3.0.6.tgz#ee180f53f9f40f8302923b9c09d821cf8ada01eb\"\n+ integrity sha512-/McWHgRG3CjXo/1ctlxH3mjW2psjf/QYAt9kWUTEtHu4b6z1y4hfUIGuYEJ02asaS1ixPsYrkqVqwzTv4olUMQ==\nreact-native-safe-modules@^1.0.0:\nversion \"1.0.0\"\n@@ -11903,10 +12048,10 @@ react-native-safe-modules@^1.0.0:\ndependencies:\ndedent \"^0.6.0\"\n-react-native-screens@^2.7.0:\n- version \"2.7.0\"\n- resolved \"https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.7.0.tgz#2d3cf3c39a665e9ca1c774264fccdb90e7944047\"\n- integrity sha512-n/23IBOkrTKCfuUd6tFeRkn3lB2QZ3cmvoubRscR0JU/Zl4/ZyKmwnFmUv1/Fr+2GH/H8UTX59kEKDYYg3dMgA==\n+react-native-screens@^2.9.0:\n+ version \"2.9.0\"\n+ resolved \"https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.9.0.tgz#ead2843107ba00fee259aa377582e457c74f1f3b\"\n+ integrity sha512-5MaiUD6HA3nzY3JbVI8l3V7pKedtxQF3d8qktTVI0WmWXTI4QzqOU8r8fPVvfKo3MhOXwhWBjr+kQ7DZaIQQeg==\nreact-native-tab-view@^2.14.4:\nversion \"2.14.4\"\n@@ -13481,6 +13626,14 @@ string.prototype.matchall@^4.0.2:\nregexp.prototype.flags \"^1.3.0\"\nside-channel \"^1.0.2\"\n+string.prototype.trimend@^1.0.1:\n+ version \"1.0.1\"\n+ resolved \"https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913\"\n+ integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==\n+ dependencies:\n+ define-properties \"^1.1.3\"\n+ es-abstract \"^1.17.5\"\n+\nstring.prototype.trimleft@^2.1.0:\nversion \"2.1.0\"\nresolved \"https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz#6cc47f0d7eb8d62b0f3701611715a3954591d634\"\n@@ -13513,6 +13666,14 @@ string.prototype.trimright@^2.1.1:\ndefine-properties \"^1.1.3\"\nfunction-bind \"^1.1.1\"\n+string.prototype.trimstart@^1.0.1:\n+ version \"1.0.1\"\n+ resolved \"https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54\"\n+ integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==\n+ dependencies:\n+ define-properties \"^1.1.3\"\n+ es-abstract \"^1.17.5\"\n+\nstring_decoder@^1.0.0, string_decoder@^1.1.1:\nversion \"1.3.0\"\nresolved \"https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e\"\n@@ -14774,6 +14935,27 @@ whatwg-url@^7.0.0:\ntr46 \"^1.0.1\"\nwebidl-conversions \"^4.0.2\"\n+which-boxed-primitive@^1.0.1:\n+ version \"1.0.1\"\n+ resolved \"https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.1.tgz#cbe8f838ebe91ba2471bb69e9edbda67ab5a5ec1\"\n+ integrity sha512-7BT4TwISdDGBgaemWU0N0OU7FeAEJ9Oo2P1PHRm/FCWoEi2VLWC9b6xvxAA3C/NMpxg3HXVgi0sMmGbNUbNepQ==\n+ dependencies:\n+ is-bigint \"^1.0.0\"\n+ is-boolean-object \"^1.0.0\"\n+ is-number-object \"^1.0.3\"\n+ is-string \"^1.0.4\"\n+ is-symbol \"^1.0.2\"\n+\n+which-collection@^1.0.1:\n+ version \"1.0.1\"\n+ resolved \"https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.1.tgz#70eab71ebbbd2aefaf32f917082fc62cdcb70906\"\n+ integrity sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==\n+ dependencies:\n+ is-map \"^2.0.1\"\n+ is-set \"^2.0.1\"\n+ is-weakmap \"^2.0.1\"\n+ is-weakset \"^2.0.1\"\n+\nwhich-module@^2.0.0:\nversion \"2.0.0\"\nresolved \"https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a\"\n@@ -14784,6 +14966,18 @@ which-pm-runs@^1.0.0:\nresolved \"https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb\"\nintegrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=\n+which-typed-array@^1.1.2:\n+ version \"1.1.2\"\n+ resolved \"https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.2.tgz#e5f98e56bda93e3dac196b01d47c1156679c00b2\"\n+ integrity sha512-KT6okrd1tE6JdZAy3o2VhMoYPh3+J6EMZLyrxBQsZflI1QCZIxMrIYLkosd8Twf+YfknVIHmYQPgJt238p8dnQ==\n+ dependencies:\n+ available-typed-arrays \"^1.0.2\"\n+ es-abstract \"^1.17.5\"\n+ foreach \"^2.0.5\"\n+ function-bind \"^1.1.1\"\n+ has-symbols \"^1.0.1\"\n+ is-typed-array \"^1.1.3\"\n+\nwhich@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1:\nversion \"1.3.1\"\nresolved \"https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a\"\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Update React Navigation
Also installed @react-navigation/devtools for the first time |
129,187 | 26.06.2020 13:39:38 | 14,400 | 3a30086efd92d4121e81640ebcc697ec4e1e94a9 | [native] Convert Root to hook and update React Nav devtools logic | [
{
"change_type": "MODIFY",
"old_path": "native/navigation/navigation-handler.react.js",
"new_path": "native/navigation/navigation-handler.react.js",
"diff": "@@ -16,8 +16,6 @@ import NavFromReduxHandler from './nav-from-redux-handler.react';\nimport { logInActionType, logOutActionType } from './action-types';\nimport DevTools from '../redux/dev-tools.react';\n-global.REACT_NAVIGATION_REDUX_DEVTOOLS_EXTENSION_INTEGRATION_ENABLED = true;\n-\nconst NavigationHandler = React.memo<{||}>(() => {\nconst navContext = React.useContext(NavContext);\nconst reduxRehydrated = useSelector(\n"
},
{
"change_type": "MODIFY",
"old_path": "native/navigation/root-navigator.react.js",
"new_path": "native/navigation/root-navigator.react.js",
"diff": "@@ -13,8 +13,6 @@ import {\ntype ExtraStackNavigatorProps,\n} from '@react-navigation/native';\nimport { StackView, TransitionPresets } from '@react-navigation/stack';\n-import NavigationBuilderContext from '@react-navigation/core/src/NavigationBuilderContext';\n-import invariant from 'invariant';\nimport {\nLoggedOutModalRouteName,\n@@ -40,7 +38,6 @@ import AddFriendsModal from '../more/add-friends-modal.react';\nimport ComposeSubthreadModal from '../chat/settings/compose-subthread-modal.react';\nimport RootRouter, { type RootRouterNavigationProp } from './root-router';\nimport { RootNavigatorContext } from './root-navigator-context';\n-import { RootContext } from '../root-context';\nif (Platform.OS !== 'android' || Platform.Version >= 21) {\n// Older Android devices get stack overflows when trying to draw deeply nested\n@@ -141,37 +138,7 @@ const Root = createRootNavigator<\nRootNavigationProp<>,\n>();\nconst RootComponent = () => {\n- const builderContext = React.useContext(NavigationBuilderContext);\n- invariant(\n- builderContext && builderContext.trackAction,\n- 'trackAction should be set in NavigationBuilderContext',\n- );\n- const baseTrackAction = builderContext.trackAction;\n-\n- const rootContext = React.useContext(RootContext);\n- invariant(\n- rootContext && rootContext.onNavAction,\n- 'onNavAction should be set in RootContext',\n- );\n- const { onNavAction } = rootContext;\n-\n- const replacedTrackAction = React.useCallback(\n- action => {\n- onNavAction(action);\n- return baseTrackAction(action);\n- },\n- [onNavAction, baseTrackAction],\n- );\n- const replacedBuilderContext = React.useMemo(\n- () => ({\n- ...builderContext,\n- trackAction: replacedTrackAction,\n- }),\n- [builderContext, replacedTrackAction],\n- );\n-\nreturn (\n- <NavigationBuilderContext.Provider value={replacedBuilderContext}>\n<Root.Navigator\nmode=\"modal\"\nheaderMode=\"none\"\n@@ -218,7 +185,6 @@ const RootComponent = () => {\noptions={modalOverlayScreenOptions}\n/>\n</Root.Navigator>\n- </NavigationBuilderContext.Provider>\n);\n};\nexport default RootComponent;\n"
},
{
"change_type": "MODIFY",
"old_path": "native/root-context.js",
"new_path": "native/root-context.js",
"diff": "// @flow\n-import type { GenericNavigationAction } from '@react-navigation/native';\n-\nimport * as React from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport PropTypes from 'prop-types';\n@@ -9,7 +7,6 @@ import PropTypes from 'prop-types';\nexport type RootContextType = {|\ndetectUnsupervisedBackground?: ?(alreadyClosed: boolean) => boolean,\nsetNavStateInitialized: () => void,\n- onNavAction: (action: GenericNavigationAction | string) => void,\n|};\nconst RootContext = React.createContext<?RootContextType>(null);\n@@ -44,7 +41,6 @@ function withRootContext<\nconst rootContextPropType = PropTypes.shape({\ndetectUnsupervisedBackground: PropTypes.func,\nsetNavStateInitialized: PropTypes.func.isRequired,\n- onNavAction: PropTypes.func.isRequired,\n});\nexport { RootContext, withRootContext, rootContextPropType };\n"
},
{
"change_type": "MODIFY",
"old_path": "native/root.react.js",
"new_path": "native/root.react.js",
"diff": "// @flow\n-import { type GlobalTheme, globalThemePropType } from './types/themes';\n-import type { AppState } from './redux/redux-setup';\n-import type { NavAction } from './navigation/navigation-context';\n-import type {\n- PossiblyStaleNavigationState,\n- GenericNavigationAction,\n-} from '@react-navigation/native';\n+import type { PossiblyStaleNavigationState } from '@react-navigation/native';\nimport * as React from 'react';\n-import { Provider } from 'react-redux';\n+import { Provider, useSelector } from 'react-redux';\nimport { Platform, UIManager, View, StyleSheet } from 'react-native';\nimport Orientation from 'react-native-orientation-locker';\nimport { PersistGate } from 'redux-persist/integration/react';\n@@ -17,9 +11,8 @@ import AsyncStorage from '@react-native-community/async-storage';\nimport { NavigationContainer } from '@react-navigation/native';\nimport invariant from 'invariant';\nimport { SafeAreaProvider } from 'react-native-safe-area-context';\n-import PropTypes from 'prop-types';\n+import { useReduxDevToolsExtension } from '@react-navigation/devtools';\n-import { connect } from 'lib/utils/redux-utils';\nimport { actionLogger } from 'lib/utils/action-logger';\nimport RootNavigator from './navigation/root-navigator.react';\n@@ -33,12 +26,9 @@ import ThemeHandler from './themes/theme-handler.react';\nimport OrientationHandler from './navigation/orientation-handler.react';\nimport Socket from './socket.react';\nimport { getPersistor } from './redux/persist';\n-import {\n- NavContext,\n- type NavContextType,\n-} from './navigation/navigation-context';\n+import { NavContext } from './navigation/navigation-context';\nimport { setGlobalNavContext } from './navigation/icky-global';\n-import { RootContext, type RootContextType } from './root-context';\n+import { RootContext } from './root-context';\nimport NavigationHandler from './navigation/navigation-handler.react';\nimport { defaultNavigationState } from './navigation/default-state';\nimport InputStateContainer from './input/input-state-container.react';\n@@ -56,45 +46,33 @@ if (Platform.OS === 'android') {\nconst navInitAction = Object.freeze({ type: 'NAV/@@INIT' });\nconst navUnknownAction = Object.freeze({ type: 'NAV/@@UNKNOWN' });\n-type Props = {\n- // Redux state\n- activeTheme: ?GlobalTheme,\n- frozen: boolean,\n-};\n-type State = {|\n- navContext: ?NavContextType,\n- rootContext: RootContextType,\n- initialState: ?PossiblyStaleNavigationState,\n-|};\n-class Root extends React.PureComponent<Props, State> {\n- static propTypes = {\n- activeTheme: globalThemePropType,\n- frozen: PropTypes.bool.isRequired,\n- };\n- navDispatch: ?(action: NavAction) => void;\n- navState: ?PossiblyStaleNavigationState;\n- navStateInitialized = false;\n- queuedActions = [];\n-\n- constructor(props: Props) {\n- super(props);\n- this.state = {\n- navContext: null,\n- rootContext: {\n- setNavStateInitialized: this.setNavStateInitialized,\n- onNavAction: this.onNavAction,\n- },\n- initialState: null,\n- };\n+function Root() {\n+ const navStateRef = React.useRef();\n+ const navDispatchRef = React.useRef();\n+ const navStateInitializedRef = React.useRef(false);\n+\n+ const [navContext, setNavContext] = React.useState(null);\n+ const updateNavContext = React.useCallback(() => {\n+ if (\n+ !navStateRef.current ||\n+ !navDispatchRef.current ||\n+ !navStateInitializedRef.current\n+ ) {\n+ return;\n}\n+ const updatedNavContext = {\n+ state: navStateRef.current,\n+ dispatch: navDispatchRef.current,\n+ };\n+ setNavContext(updatedNavContext);\n+ setGlobalNavContext(updatedNavContext);\n+ }, [navStateRef, navDispatchRef, navStateInitializedRef, setNavContext]);\n- componentDidMount() {\n+ const [initialState, setInitialState] = React.useState(null);\n+ React.useEffect(() => {\nOrientation.lockToPortrait();\n- this.loadInitialState();\n- }\n-\n- async loadInitialState() {\n- let initialState;\n+ (async () => {\n+ let loadedState;\nif (__DEV__) {\ntry {\nconst navStateString = await AsyncStorage.getItem(\n@@ -103,32 +81,118 @@ class Root extends React.PureComponent<Props, State> {\nif (navStateString) {\nconst savedState = JSON.parse(navStateString);\nif (validNavState(savedState)) {\n- initialState = savedState;\n+ loadedState = savedState;\n}\n}\n} catch {}\n}\n- if (!initialState) {\n- initialState = defaultNavigationState;\n+ if (!loadedState) {\n+ loadedState = defaultNavigationState;\n+ }\n+ navStateRef.current = loadedState;\n+ updateNavContext();\n+ actionLogger.addOtherAction('navState', navInitAction, null, loadedState);\n+ setInitialState(loadedState);\n+ })();\n+ }, [navStateRef, updateNavContext, setInitialState]);\n+\n+ const setNavStateInitialized = React.useCallback(() => {\n+ navStateInitializedRef.current = true;\n+ updateNavContext();\n+ }, [navStateInitializedRef, updateNavContext]);\n+\n+ const [rootContext, setRootContext] = React.useState(() => ({\n+ setNavStateInitialized,\n+ }));\n+\n+ const detectUnsupervisedBackgroundRef = React.useCallback(\n+ (detectUnsupervisedBackground: ?(alreadyClosed: boolean) => boolean) => {\n+ setRootContext(prevRootContext => ({\n+ ...prevRootContext,\n+ detectUnsupervisedBackground,\n+ }));\n+ },\n+ [setRootContext],\n+ );\n+\n+ const frozen = useSelector(state => state.frozen);\n+ const queuedActionsRef = React.useRef([]);\n+ const onNavigationStateChange = React.useCallback(\n+ (state: ?PossiblyStaleNavigationState) => {\n+ invariant(state, 'nav state should be non-null');\n+ const prevState = navStateRef.current;\n+ navStateRef.current = state;\n+ updateNavContext();\n+\n+ const queuedActions = queuedActionsRef.current;\n+ queuedActionsRef.current = [];\n+ if (queuedActions.length === 0) {\n+ queuedActions.push(navUnknownAction);\n+ }\n+ for (let action of queuedActions) {\n+ actionLogger.addOtherAction('navState', action, prevState, state);\n+ }\n+\n+ if (!__DEV__ || frozen) {\n+ return;\n+ }\n+\n+ (async () => {\n+ try {\n+ await AsyncStorage.setItem(\n+ navStateAsyncStorageKey,\n+ JSON.stringify(state),\n+ );\n+ } catch (e) {\n+ console.log('AsyncStorage threw while trying to persist navState', e);\n+ }\n+ })();\n+ },\n+ [navStateRef, updateNavContext, queuedActionsRef, frozen],\n+ );\n+\n+ const navContainerRef = React.useRef();\n+ const containerRef = React.useCallback(\n+ (navContainer: ?React.ElementRef<typeof NavigationContainer>) => {\n+ navContainerRef.current = navContainer;\n+ if (navContainer && !navDispatchRef.current) {\n+ navDispatchRef.current = navContainer.dispatch;\n+ updateNavContext();\n}\n- this.navState = initialState;\n- this.setNavContext();\n- actionLogger.addOtherAction('navState', navInitAction, null, initialState);\n- this.setState({ initialState });\n+ },\n+ [navContainerRef, navDispatchRef, updateNavContext],\n+ );\n+ useReduxDevToolsExtension(navContainerRef);\n+\n+ const navContainer = navContainerRef.current;\n+ React.useEffect(() => {\n+ if (!navContainer) {\n+ return;\n+ }\n+ return navContainer.addListener('__unsafe_action__', event => {\n+ const { action, noop } = event.data;\n+ const navState = navStateRef.current;\n+ if (noop) {\n+ actionLogger.addOtherAction('navState', action, navState, navState);\n+ return;\n}\n+ queuedActionsRef.current.push({\n+ ...action,\n+ type: `NAV/${action.type}`,\n+ });\n+ });\n+ }, [navContainer, navStateRef, queuedActionsRef]);\n- get theme() {\n- const { activeTheme } = this.props;\n+ const activeTheme = useSelector(state => state.globalThemeInfo.activeTheme);\n+ const theme = (() => {\nif (activeTheme === 'light') {\nreturn LightTheme;\n} else if (activeTheme === 'dark') {\nreturn DarkTheme;\n}\nreturn undefined;\n- }\n+ })();\n- render() {\n- const { detectUnsupervisedBackgroundRef } = this;\nconst gated: React.Node = (\n<>\n<LifecycleHandler />\n@@ -142,14 +206,14 @@ class Root extends React.PureComponent<Props, State> {\n<OrientationHandler />\n</>\n);\n- let navContainer;\n- if (this.state.initialState) {\n- navContainer = (\n+ let navigation;\n+ if (initialState) {\n+ navigation = (\n<NavigationContainer\n- initialState={this.state.initialState}\n- onStateChange={this.onNavigationStateChange}\n- theme={this.theme}\n- ref={this.navContainerRef}\n+ initialState={initialState}\n+ onStateChange={onNavigationStateChange}\n+ theme={theme}\n+ ref={containerRef}\n>\n<RootNavigator />\n</NavigationContainer>\n@@ -157,13 +221,13 @@ class Root extends React.PureComponent<Props, State> {\n}\nreturn (\n<View style={styles.app}>\n- <NavContext.Provider value={this.state.navContext}>\n- <RootContext.Provider value={this.state.rootContext}>\n+ <NavContext.Provider value={navContext}>\n+ <RootContext.Provider value={rootContext}>\n<InputStateContainer>\n<SafeAreaProvider>\n<ConnectedStatusBar />\n<PersistGate persistor={getPersistor()}>{gated}</PersistGate>\n- {navContainer}\n+ {navigation}\n<NavigationHandler />\n</SafeAreaProvider>\n</InputStateContainer>\n@@ -173,110 +237,16 @@ class Root extends React.PureComponent<Props, State> {\n);\n}\n- detectUnsupervisedBackgroundRef = (\n- detectUnsupervisedBackground: ?(alreadyClosed: boolean) => boolean,\n- ) => {\n- this.setState(prevState => ({\n- rootContext: {\n- ...prevState.rootContext,\n- detectUnsupervisedBackground,\n- },\n- }));\n- };\n-\n- onNavigationStateChange = (state: ?PossiblyStaleNavigationState) => {\n- invariant(state, 'nav state should be non-null');\n- const prevState = this.navState;\n- this.navState = state;\n- this.setNavContext();\n-\n- const { queuedActions } = this;\n- this.queuedActions = [];\n- if (queuedActions.length === 0) {\n- queuedActions.push(navUnknownAction);\n- }\n- for (let action of queuedActions) {\n- actionLogger.addOtherAction('navState', action, prevState, state);\n- }\n-\n- if (__DEV__ && !this.props.frozen) {\n- this.persistNavigationState(state);\n- }\n- };\n-\n- navContainerRef = (\n- navContainer: ?React.ElementRef<typeof NavigationContainer>,\n- ) => {\n- if (!navContainer) {\n- return;\n- }\n- if (!this.navDispatch) {\n- this.navDispatch = navContainer.dispatch;\n- this.setNavContext();\n- }\n- };\n-\n- setNavContext() {\n- if (!this.navState || !this.navDispatch || !this.navStateInitialized) {\n- return;\n- }\n- const navContext = {\n- state: this.navState,\n- dispatch: this.navDispatch,\n- };\n- this.setState({ navContext });\n- setGlobalNavContext(navContext);\n- }\n-\n- setNavStateInitialized = () => {\n- this.navStateInitialized = true;\n- this.setNavContext();\n- };\n-\n- onNavAction = (action: GenericNavigationAction | string) => {\n- if (typeof action === 'string') {\n- this.queuedActions.push({ type: `NAV/${action}` });\n- } else if (\n- action &&\n- typeof action === 'object' &&\n- typeof action.type === 'string'\n- ) {\n- this.queuedActions.push({\n- ...action,\n- type: `NAV/${action.type}`,\n- });\n- } else {\n- this.queuedActions.push(action);\n- }\n- };\n-\n- persistNavigationState = async (state: PossiblyStaleNavigationState) => {\n- try {\n- await AsyncStorage.setItem(\n- navStateAsyncStorageKey,\n- JSON.stringify(state),\n- );\n- } catch (e) {\n- console.log('AsyncStorage threw while trying to persist navState', e);\n- }\n- };\n-}\n-\nconst styles = StyleSheet.create({\napp: {\nflex: 1,\n},\n});\n-const ConnectedRoot = connect((state: AppState) => ({\n- activeTheme: state.globalThemeInfo.activeTheme,\n- frozen: state.frozen,\n-}))(Root);\n-\nconst AppRoot = () => (\n<Provider store={store}>\n<ErrorBoundary>\n- <ConnectedRoot />\n+ <Root />\n</ErrorBoundary>\n</Provider>\n);\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Convert Root to hook and update React Nav devtools logic |
129,187 | 26.06.2020 14:14:02 | 14,400 | 08b67ab960516e824d9e259f16eb9950102d0d37 | [native] Sort MediaGalleryKeyboard by creationTime
Testers have reported that sorting by `modificationTime` gave weird results | [
{
"change_type": "MODIFY",
"old_path": "native/media/media-gallery-keyboard.react.js",
"new_path": "native/media/media-gallery-keyboard.react.js",
"diff": "@@ -209,7 +209,7 @@ class MediaGalleryKeyboard extends React.PureComponent<Props, State> {\nfirst: 20,\nafter,\nmediaType: [MediaLibrary.MediaType.photo, MediaLibrary.MediaType.video],\n- sortBy: [MediaLibrary.SortBy.modificationTime],\n+ sortBy: [MediaLibrary.SortBy.creationTime],\n});\nlet firstRemoved = false,\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Sort MediaGalleryKeyboard by creationTime
Testers have reported that sorting by `modificationTime` gave weird results |
129,187 | 29.06.2020 09:47:28 | 14,400 | f4795eeaec5b335caf1b1dbd45cd24f7714d9dbe | [native] Final changes for background threads | [
{
"change_type": "MODIFY",
"old_path": "native/chat/chat.react.js",
"new_path": "native/chat/chat.react.js",
"diff": "@@ -18,8 +18,8 @@ import { StackView } from '@react-navigation/stack';\nimport { Platform, StyleSheet } from 'react-native';\nimport invariant from 'invariant';\n-import HomeChatThreadList from './chat-thread-home.react';\n-import BackgroundChatThreadList from './chat-thread-background.react';\n+import HomeChatThreadList from './home-chat-thread-list.react';\n+import BackgroundChatThreadList from './background-chat-thread-list.react';\nimport MessageListContainer from './message-list-container.react';\nimport ComposeThread from './compose-thread.react';\nimport ThreadSettings from './settings/thread-settings.react';\n"
},
{
"change_type": "RENAME",
"old_path": "native/chat/chat-thread-home.react.js",
"new_path": "native/chat/home-chat-thread-list.react.js",
"diff": ""
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Final changes for background threads |
129,187 | 29.06.2020 09:51:30 | 14,400 | 729fffc5f4ce6d3da51bccefed91719da55a7e8d | [native] codeVersion -> 54
Support for background threads on native! | [
{
"change_type": "MODIFY",
"old_path": "native/android/app/build.gradle",
"new_path": "native/android/app/build.gradle",
"diff": "@@ -132,8 +132,8 @@ android {\napplicationId \"org.squadcal\"\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 53\n- versionName \"0.0.53\"\n+ versionCode 54\n+ versionName \"0.0.54\"\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "native/ios/SquadCal/Info.debug.plist",
"new_path": "native/ios/SquadCal/Info.debug.plist",
"diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>0.0.53</string>\n+ <string>0.0.54</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>53</string>\n+ <string>54</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/ios/SquadCal/Info.release.plist",
"new_path": "native/ios/SquadCal/Info.release.plist",
"diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>0.0.53</string>\n+ <string>0.0.54</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>53</string>\n+ <string>54</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/redux/persist.js",
"new_path": "native/redux/persist.js",
"diff": "@@ -178,7 +178,7 @@ const persistConfig = {\ntimeout: __DEV__ ? 0 : undefined,\n};\n-const codeVersion = 53;\n+const codeVersion = 54;\n// This local exists to avoid a circular dependency where redux-setup needs to\n// import all the navigation and screen stuff, but some of those screens want to\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] codeVersion -> 54
Support for background threads on native! |
129,186 | 30.06.2020 14:18:17 | -7,200 | c86e148ba24327b247d122c4fdebc7131d4380c8 | [server] Fix relationship updater | [
{
"change_type": "MODIFY",
"old_path": "server/src/fetchers/relationship-fetchers.js",
"new_path": "server/src/fetchers/relationship-fetchers.js",
"diff": "@@ -52,12 +52,12 @@ async function fetchFriendRequestRelationshipOperations(\nconst viewerBlockedTarget = relationships.some(\nrelationship =>\nrelationship.status === directedStatus.BLOCKED &&\n- relationship.user1 === viewer.userID,\n+ relationship.user1.toString() === viewer.userID,\n);\nconst targetBlockedViewer = relationships.some(\nrelationship =>\nrelationship.status === directedStatus.BLOCKED &&\n- relationship.user2 === viewer.userID,\n+ relationship.user2.toString() === viewer.userID,\n);\nconst friendshipExists = relationships.some(\nrelationship => relationship.status === undirectedStatus.FRIEND,\n@@ -65,12 +65,12 @@ async function fetchFriendRequestRelationshipOperations(\nconst viewerRequestedTargetFriendship = relationships.some(\nrelationship =>\nrelationship.status === directedStatus.PENDING_FRIEND &&\n- relationship.user1 === viewer.userID,\n+ relationship.user1.toString() === viewer.userID,\n);\nconst targetRequestedViewerFriendship = relationships.some(\nrelationship =>\nrelationship.status === directedStatus.PENDING_FRIEND &&\n- relationship.user2 === viewer.userID,\n+ relationship.user2.toString() === viewer.userID,\n);\nconst operations = [];\n"
},
{
"change_type": "MODIFY",
"old_path": "server/src/updaters/relationship-updaters.js",
"new_path": "server/src/updaters/relationship-updaters.js",
"diff": "@@ -77,7 +77,7 @@ async function updateRelationships(\nconst undirectedInsertQuery = SQL`\nINSERT INTO relationships_undirected (user1, user2, status)\nVALUES ${undirectedInsertRows}\n- ON DUPLICATE KEY UPDATE status = MAX(status, VALUES(status))\n+ ON DUPLICATE KEY UPDATE status = GREATEST(status, VALUES(status))\n`;\nconst directedInsertQuery = SQL`\nINSERT INTO relationships_directed (user1, user2, status)\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [server] Fix relationship updater (#94) |
129,186 | 30.06.2020 15:27:50 | -7,200 | b4a6906a7eac06dd735709c9fd54c7c2b0d37adb | [server] Fix fetchFriendRequestRelationshipOperations | [
{
"change_type": "MODIFY",
"old_path": "server/src/fetchers/relationship-fetchers.js",
"new_path": "server/src/fetchers/relationship-fetchers.js",
"diff": "@@ -88,6 +88,7 @@ async function fetchFriendRequestRelationshipOperations(\n} else if (!viewerRequestedTargetFriendship) {\noperations.push('pending_friend');\n}\n+ userRelationshipOperations[userID] = operations;\n}\nfor (let userID of userIDs) {\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [server] Fix fetchFriendRequestRelationshipOperations (#96) |
129,186 | 30.06.2020 15:40:56 | -7,200 | ff21bc2a4d64cbf4acc59bf7ac3c8bef0aedea3d | [server] Fix queries in updateRelationships | [
{
"change_type": "MODIFY",
"old_path": "server/src/updaters/relationship-updaters.js",
"new_path": "server/src/updaters/relationship-updaters.js",
"diff": "@@ -81,16 +81,24 @@ async function updateRelationships(\n}\n}\n+ const promises = [];\n+ if (undirectedInsertRows.length) {\nconst undirectedInsertQuery = SQL`\nINSERT INTO relationships_undirected (user1, user2, status)\nVALUES ${undirectedInsertRows}\nON DUPLICATE KEY UPDATE status = GREATEST(status, VALUES(status))\n`;\n+ promises.push(dbQuery(undirectedInsertQuery));\n+ }\n+ if (directedInsertRows.length) {\nconst directedInsertQuery = SQL`\nINSERT INTO relationships_directed (user1, user2, status)\nVALUES ${directedInsertRows}\nON DUPLICATE KEY UPDATE status = VALUES(status)\n`;\n+ promises.push(dbQuery(directedInsertQuery));\n+ }\n+ if (directedDeleteIDs.length) {\nconst directedDeleteQuery = SQL`\nDELETE FROM relationships_directed\nWHERE\n@@ -98,12 +106,6 @@ async function updateRelationships(\n(status = ${directedStatus.PENDING_FRIEND} AND\nuser1 IN (${directedDeleteIDs}) AND user2 = ${viewer.userID})\n`;\n-\n- const promises = [\n- dbQuery(undirectedInsertQuery),\n- dbQuery(directedInsertQuery),\n- ];\n- if (directedDeleteQuery.length) {\npromises.push(dbQuery(directedDeleteQuery));\n}\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [server] Fix queries in updateRelationships (#97) |
129,187 | 01.07.2020 17:43:29 | 14,400 | d03f41dcabedbfdd50d745656be9f7acfc5e2e27 | [server] Prevent onSuccessfulConnection from being called if socket is closed | [
{
"change_type": "MODIFY",
"old_path": "server/src/socket/socket.js",
"new_path": "server/src/socket/socket.js",
"diff": "@@ -340,8 +340,12 @@ class Socket {\n};\nonClose = async () => {\n- if (this.updateActivityTimeIntervalID) {\n- clearInterval(this.updateActivityTimeIntervalID);\n+ const { updateActivityTimeIntervalID } = this;\n+ if (\n+ updateActivityTimeIntervalID !== null &&\n+ updateActivityTimeIntervalID !== undefined\n+ ) {\n+ clearInterval(updateActivityTimeIntervalID);\nthis.updateActivityTimeIntervalID = null;\n}\nthis.clearStateCheckTimeout();\n@@ -483,7 +487,6 @@ class Socket {\n} = sessionInitializationResult;\nconst promises = {};\n- promises.activityUpdate = updateActivityTime(viewer);\npromises.deleteExpiredUpdates = deleteUpdatesBeforeTimeTargettingSession(\nviewer,\noldUpdatesCurrentAsOf,\n@@ -710,6 +713,9 @@ class Socket {\n}\nonSuccessfulConnection() {\n+ if (this.ws.readyState !== 1) {\n+ return;\n+ }\nthis.updateActivityTimeIntervalID = setInterval(\nthis.updateActivityTime,\nfocusedTableRefreshFrequency,\n@@ -737,13 +743,17 @@ class Socket {\n);\nmarkActivityOccurred = () => {\n+ if (this.ws.readyState !== 1) {\n+ return;\n+ }\nthis.setStateCheckConditions({ activityRecentlyOccurred: true });\nthis.debouncedAfterActivity();\n};\nclearStateCheckTimeout() {\n- if (this.stateCheckTimeoutID) {\n- clearTimeout(this.stateCheckTimeoutID);\n+ const { stateCheckTimeoutID } = this;\n+ if (stateCheckTimeoutID) {\n+ clearTimeout(stateCheckTimeoutID);\nthis.stateCheckTimeoutID = null;\n}\n}\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [server] Prevent onSuccessfulConnection from being called if socket is closed |
129,187 | 01.07.2020 22:04:25 | 14,400 | 630b38643fe4acb47deab8158cbdeab6a1e5ec64 | [lib] lib/selectors/server-calls.js | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "lib/selectors/server-calls.js",
"diff": "+// @flow\n+\n+import type { AppState } from '../types/redux-types';\n+import {\n+ type ConnectionStatus,\n+ connectionStatusPropType,\n+} from '../types/socket-types';\n+import { type CurrentUserInfo, currentUserPropType } from '../types/user-types';\n+\n+import { createSelector } from 'reselect';\n+import PropTypes from 'prop-types';\n+\n+export type ServerCallState = {|\n+ cookie: ?string,\n+ urlPrefix: string,\n+ sessionID: ?string,\n+ currentUserInfo: ?CurrentUserInfo,\n+ connectionStatus: ConnectionStatus,\n+|};\n+\n+const serverCallStatePropType = PropTypes.shape({\n+ cookie: PropTypes.string,\n+ urlPrefix: PropTypes.string.isRequired,\n+ sessionID: PropTypes.string,\n+ currentUserInfo: currentUserPropType,\n+ connectionStatus: connectionStatusPropType.isRequired,\n+});\n+\n+const serverCallStateSelector: (\n+ state: AppState,\n+) => ServerCallState = createSelector(\n+ (state: AppState) => state.cookie,\n+ (state: AppState) => state.urlPrefix,\n+ (state: AppState) => state.sessionID,\n+ (state: AppState) => state.currentUserInfo,\n+ (state: AppState) => state.connection.status,\n+ (\n+ cookie: ?string,\n+ urlPrefix: string,\n+ sessionID: ?string,\n+ currentUserInfo: ?CurrentUserInfo,\n+ connectionStatus: ConnectionStatus,\n+ ) => ({\n+ cookie,\n+ urlPrefix,\n+ sessionID,\n+ currentUserInfo,\n+ connectionStatus,\n+ }),\n+);\n+\n+export { serverCallStatePropType, serverCallStateSelector };\n"
},
{
"change_type": "MODIFY",
"old_path": "lib/utils/redux-utils.js",
"new_path": "lib/utils/redux-utils.js",
"diff": "import type { ServerCalls } from './action-utils';\nimport type { AppState } from '../types/redux-types';\n-import {\n- type ConnectionStatus,\n- connectionStatusPropType,\n-} from '../types/socket-types';\n-import { type CurrentUserInfo, currentUserPropType } from '../types/user-types';\n+import type { ConnectionStatus } from '../types/socket-types';\n+import type { CurrentUserInfo } from '../types/user-types';\nimport { connect as reactReduxConnect } from 'react-redux';\nimport invariant from 'invariant';\n-import { createSelector } from 'reselect';\n-import PropTypes from 'prop-types';\nimport { includeDispatchActionProps, bindServerCalls } from './action-utils';\n-\n-export type ServerCallState = {|\n- cookie: ?string,\n- urlPrefix: string,\n- sessionID: ?string,\n- currentUserInfo: ?CurrentUserInfo,\n- connectionStatus: ConnectionStatus,\n-|};\n-\n-const serverCallStatePropType = PropTypes.shape({\n- cookie: PropTypes.string,\n- urlPrefix: PropTypes.string.isRequired,\n- sessionID: PropTypes.string,\n- currentUserInfo: currentUserPropType,\n- connectionStatus: connectionStatusPropType.isRequired,\n-});\n-\n-const serverCallStateSelector: (\n- state: AppState,\n-) => ServerCallState = createSelector(\n- (state: AppState) => state.cookie,\n- (state: AppState) => state.urlPrefix,\n- (state: AppState) => state.sessionID,\n- (state: AppState) => state.currentUserInfo,\n- (state: AppState) => state.connection.status,\n- (\n- cookie: ?string,\n- urlPrefix: string,\n- sessionID: ?string,\n- currentUserInfo: ?CurrentUserInfo,\n- connectionStatus: ConnectionStatus,\n- ) => ({\n- cookie,\n- urlPrefix,\n- sessionID,\n- currentUserInfo,\n- connectionStatus,\n- }),\n-);\n+import { serverCallStateSelector } from '../selectors/server-calls';\nfunction connect<S: AppState, OP: Object, SP: Object>(\ninputMapStateToProps: ?(state: S, ownProps: OP) => SP,\n@@ -118,4 +75,4 @@ function connect<S: AppState, OP: Object, SP: Object>(\n}\n}\n-export { serverCallStatePropType, serverCallStateSelector, connect };\n+export { connect };\n"
},
{
"change_type": "MODIFY",
"old_path": "native/navigation/tooltip.react.js",
"new_path": "native/navigation/tooltip.react.js",
"diff": "@@ -36,8 +36,8 @@ import {\ntype ServerCallState,\nserverCallStatePropType,\nserverCallStateSelector,\n- connect,\n-} from 'lib/utils/redux-utils';\n+} from 'lib/selectors/server-calls';\n+import { connect } from 'lib/utils/redux-utils';\nimport { createBoundServerCallsSelector } from 'lib/utils/action-utils';\nimport {\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [lib] lib/selectors/server-calls.js |
129,187 | 01.07.2020 22:06:49 | 14,400 | 04b1cec80bc6e7450660b8f4b440515cd45fec8d | [lib] Server calls for hooks | [
{
"change_type": "MODIFY",
"old_path": "lib/utils/action-utils.js",
"new_path": "lib/utils/action-utils.js",
"diff": "@@ -25,10 +25,15 @@ import invariant from 'invariant';\nimport _mapValues from 'lodash/fp/mapValues';\nimport { createSelector } from 'reselect';\nimport _memoize from 'lodash/memoize';\n+import * as React from 'react';\n+import * as ReactRedux from 'react-redux';\nimport fetchJSON from './fetch-json';\nimport { getConfig } from './config';\nimport { cookieInvalidationResolutionAttempt } from '../actions/user-actions';\n+import { serverCallStateSelector } from '../selectors/server-calls';\n+\n+const { useSelector, useDispatch } = ReactRedux;\nlet nextPromiseIndex = 0;\n@@ -110,12 +115,12 @@ export type DispatchActionPromise = <\nstartingPayload?: $PropertyType<A, 'payload'>,\n) => Promise<void>;\n-export type DispatchFunctions = {\n- dispatch: Dispatch,\n- dispatchActionPayload: DispatchActionPayload,\n- dispatchActionPromise: DispatchActionPromise,\n-};\n-function includeDispatchActionProps(dispatch: Dispatch): DispatchFunctions {\n+function useDispatchActionPromise() {\n+ const dispatch = useDispatch();\n+ return React.useMemo(() => createDispatchActionPromise(dispatch), [dispatch]);\n+}\n+\n+function createDispatchActionPromise(dispatch: Dispatch) {\nconst dispatchActionPromise = function<\nA: BaseAction,\nB: BaseAction,\n@@ -134,6 +139,16 @@ function includeDispatchActionProps(dispatch: Dispatch): DispatchFunctions {\nwrapActionPromise(actionTypes, promise, loadingOptions, startingPayload),\n);\n};\n+ return dispatchActionPromise;\n+}\n+\n+export type DispatchFunctions = {\n+ dispatch: Dispatch,\n+ dispatchActionPayload: DispatchActionPayload,\n+ dispatchActionPromise: DispatchActionPromise,\n+};\n+function includeDispatchActionProps(dispatch: Dispatch): DispatchFunctions {\n+ const dispatchActionPromise = createDispatchActionPromise(dispatch);\nconst dispatchActionPayload = function<T: string, P: ActionPayload>(\nactionType: T,\npayload: P,\n@@ -441,16 +456,31 @@ function bindServerCalls(serverCalls: ServerCalls) {\n};\n}\n+function useServerCall(serverCall: ActionFunc): BoundServerCall {\n+ const dispatch = useDispatch();\n+ const serverCallState = useSelector(state => serverCallStateSelector(state));\n+ return React.useMemo(\n+ () =>\n+ createBoundServerCallsSelector(serverCall)({\n+ ...serverCallState,\n+ dispatch,\n+ }),\n+ [serverCall, dispatch, serverCallState],\n+ );\n+}\n+\nlet socketAPIHandler: ?SocketAPIHandler = null;\nfunction registerActiveSocket(passedSocketAPIHandler: ?SocketAPIHandler) {\nsocketAPIHandler = passedSocketAPIHandler;\n}\nexport {\n+ useDispatchActionPromise,\nsetNewSessionActionType,\nincludeDispatchActionProps,\nfetchNewCookieFromNativeCredentials,\ncreateBoundServerCallsSelector,\nbindServerCalls,\nregisterActiveSocket,\n+ useServerCall,\n};\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [lib] Server calls for hooks |
129,187 | 01.07.2020 22:07:06 | 14,400 | ee6cb7da21d1700b4910cc645ac0f1774be51f2f | [lib] Convert ActivityHandler to a hook
This should fix it so activities get reported in `componentDidMount` | [
{
"change_type": "MODIFY",
"old_path": "lib/socket/activity-handler.react.js",
"new_path": "lib/socket/activity-handler.react.js",
"diff": "// @flow\n-import {\n- type ConnectionInfo,\n- connectionInfoPropType,\n-} from '../types/socket-types';\n-import {\n- type ActivityUpdate,\n- type ActivityUpdateSuccessPayload,\n- queueActivityUpdatesActionType,\n-} from '../types/activity-types';\n-import type {\n- DispatchActionPayload,\n- DispatchActionPromise,\n-} from '../utils/action-utils';\n-import type { BaseAppState } from '../types/redux-types';\n+import { queueActivityUpdatesActionType } from '../types/activity-types';\nimport * as React from 'react';\n-import PropTypes from 'prop-types';\n+import * as ReactRedux from 'react-redux';\n-import { connect } from '../utils/redux-utils';\nimport {\nupdateActivityActionTypes,\nupdateActivity,\n} from '../actions/activity-actions';\n+import { useServerCall, useDispatchActionPromise } from '../utils/action-utils';\n+\n+const { useSelector, useDispatch } = ReactRedux;\ntype Props = {|\nactiveThread: ?string,\nfrozen: boolean,\n- // Redux state\n- connection: ConnectionInfo,\n- activeThreadLatestMessage: ?string,\n- // Redux dispatch functions\n- dispatchActionPayload: DispatchActionPayload,\n- dispatchActionPromise: DispatchActionPromise,\n- // async functions that hit server APIs\n- updateActivity: (\n- activityUpdates: $ReadOnlyArray<ActivityUpdate>,\n- ) => Promise<ActivityUpdateSuccessPayload>,\n|};\n-class ActivityHandler extends React.PureComponent<Props> {\n- static propTypes = {\n- activeThread: PropTypes.string,\n- frozen: PropTypes.bool.isRequired,\n- connection: connectionInfoPropType.isRequired,\n- activeThreadLatestMessage: PropTypes.string,\n- dispatchActionPayload: PropTypes.func.isRequired,\n- dispatchActionPromise: PropTypes.func.isRequired,\n- updateActivity: PropTypes.func.isRequired,\n- };\n-\n- static canSend(props: Props) {\n- const {\n- connection: { status },\n- frozen,\n- } = props;\n- return status === 'connected' && !frozen;\n- }\n+function ActivityHandler(props: Props) {\n+ const { activeThread, frozen } = props;\n+\n+ const prevActiveThreadRef = React.useRef();\n+ React.useEffect(() => {\n+ prevActiveThreadRef.current = activeThread;\n+ }, [activeThread]);\n+ const prevActiveThread = prevActiveThreadRef.current;\n+\n+ const connection = useSelector(state => state.connection);\n+ const connectionStatus = connection.status;\n+ const prevConnectionStatusRef = React.useRef();\n+ React.useEffect(() => {\n+ prevConnectionStatusRef.current = connectionStatus;\n+ }, [connectionStatus]);\n+ const prevConnectionStatus = prevConnectionStatusRef.current;\n+\n+ const activeThreadLatestMessage = useSelector(state =>\n+ activeThread && state.messageStore.threads[activeThread]\n+ ? state.messageStore.threads[activeThread].messageIDs[0]\n+ : null,\n+ );\n+ const prevActiveThreadLatestMessageRef = React.useRef();\n+ React.useEffect(() => {\n+ prevActiveThreadLatestMessageRef.current = activeThreadLatestMessage;\n+ }, [activeThreadLatestMessage]);\n+ const prevActiveThreadLatestMessage =\n+ prevActiveThreadLatestMessageRef.current;\n+\n+ const canSend = connectionStatus === 'connected' && !frozen;\n+ const prevCanSendRef = React.useRef();\n+ React.useEffect(() => {\n+ prevCanSendRef.current = canSend;\n+ }, [canSend]);\n+ const prevCanSend = prevCanSendRef.current;\n- componentDidUpdate(prevProps: Props) {\n+ const dispatch = useDispatch();\n+ const dispatchActionPromise = useDispatchActionPromise();\n+ const callUpdateActivity = useServerCall(updateActivity);\n+\n+ React.useEffect(() => {\nconst activityUpdates = [];\n- if (this.props.activeThread !== prevProps.activeThread) {\n- if (prevProps.activeThread) {\n+ if (activeThread !== prevActiveThread) {\n+ if (prevActiveThread) {\nactivityUpdates.push({\nfocus: false,\n- threadID: prevProps.activeThread,\n- latestMessage: prevProps.activeThreadLatestMessage,\n+ threadID: prevActiveThread,\n+ latestMessage: prevActiveThreadLatestMessage,\n});\n}\n- if (this.props.activeThread) {\n+ if (activeThread) {\nactivityUpdates.push({\nfocus: true,\n- threadID: this.props.activeThread,\n+ threadID: activeThread,\n});\n}\n}\n- const { status } = this.props.connection;\n- const prevStatus = prevProps.connection.status;\nif (\n- !this.props.frozen &&\n- status !== 'connected' &&\n- prevStatus === 'connected' &&\n- this.props.activeThread\n+ !frozen &&\n+ connectionStatus !== 'connected' &&\n+ prevConnectionStatus === 'connected' &&\n+ activeThread\n) {\n// When the server closes a socket it also deletes any activity rows\n// associated with that socket's session. If that activity is still\n@@ -89,53 +87,35 @@ class ActivityHandler extends React.PureComponent<Props> {\n// we reconnect.\nactivityUpdates.push({\nfocus: true,\n- threadID: this.props.activeThread,\n+ threadID: activeThread,\n});\n}\nif (activityUpdates.length > 0) {\n- this.props.dispatchActionPayload(queueActivityUpdatesActionType, {\n- activityUpdates,\n+ dispatch({\n+ type: queueActivityUpdatesActionType,\n+ payload: { activityUpdates },\n});\n}\n- if (!ActivityHandler.canSend(this.props)) {\n+ if (!canSend) {\nreturn;\n}\n- if (!ActivityHandler.canSend(prevProps)) {\n- const { queuedActivityUpdates } = this.props.connection;\n- this.sendActivityUpdates([...queuedActivityUpdates, ...activityUpdates]);\n- } else {\n- this.sendActivityUpdates(activityUpdates);\n- }\n- }\n-\n- render() {\n- return null;\n+ if (!prevCanSend) {\n+ activityUpdates.unshift(...connection.queuedActivityUpdates);\n}\n- sendActivityUpdates(activityUpdates: $ReadOnlyArray<ActivityUpdate>) {\nif (activityUpdates.length === 0) {\nreturn;\n}\n- this.props.dispatchActionPromise(\n+ dispatchActionPromise(\nupdateActivityActionTypes,\n- this.props.updateActivity(activityUpdates),\n+ callUpdateActivity(activityUpdates),\n);\n- }\n+ });\n+\n+ return null;\n}\n-export default connect(\n- (state: BaseAppState<*>, ownProps: { activeThread: ?string }) => {\n- const { activeThread } = ownProps;\n- return {\n- connection: state.connection,\n- activeThreadLatestMessage:\n- activeThread && state.messageStore.threads[activeThread]\n- ? state.messageStore.threads[activeThread].messageIDs[0]\n- : null,\n- };\n- },\n- { updateActivity },\n-)(ActivityHandler);\n+export default ActivityHandler;\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [lib] Convert ActivityHandler to a hook
This should fix it so activities get reported in `componentDidMount` |
129,187 | 01.07.2020 22:29:12 | 14,400 | 6bfa9ec7b08f5943b2fac32ea4b36a19db85967e | [server] Call updateActivityTime on every ping from the client
Instead of just doing it until the socket is closed. This avoids extending `focused` rows if the connection "goes away" | [
{
"change_type": "MODIFY",
"old_path": "server/src/shared/focused-times.js",
"new_path": "server/src/shared/focused-times.js",
"diff": "// @flow\n-// While a socket is active (or for legacy clients, on every ping) we keep the\n-// rows in the focused table updated for the session. The server updates these\n-// rows every three seconds to keep them considered \"active\".\n-const focusedTableRefreshFrequency = 3000; // in milliseconds\n+import { pingFrequency } from 'lib/shared/timeouts';\n// If the time column for a given entry in the focused table has a time later\n// than this, then that entry is considered current, and consequently the thread\n// in question is considered in focus.\nfunction earliestFocusedTimeConsideredCurrent() {\n- return Date.now() - focusedTableRefreshFrequency - 1500;\n+ return Date.now() - pingFrequency - 1500;\n}\n// If the time column for a given entry in the focused table has a time earlier\n// than this, then that entry is considered expired, and consequently we will\n// remove it from the table in the nightly cronjob.\nfunction earliestFocusedTimeConsideredExpired() {\n- return Date.now() - focusedTableRefreshFrequency * 2 - 1500;\n+ return Date.now() - pingFrequency * 2 - 1500;\n}\nexport {\n- focusedTableRefreshFrequency,\nearliestFocusedTimeConsideredCurrent,\nearliestFocusedTimeConsideredExpired,\n};\n"
},
{
"change_type": "MODIFY",
"old_path": "server/src/socket/socket.js",
"new_path": "server/src/socket/socket.js",
"diff": "@@ -75,7 +75,6 @@ import { commitSessionUpdate } from '../updaters/session-updaters';\nimport { handleAsyncPromise } from '../responders/handlers';\nimport { deleteCookie } from '../deleters/cookie-deleters';\nimport { deleteActivityForViewerSession } from '../deleters/activity-deleters';\n-import { focusedTableRefreshFrequency } from '../shared/focused-times';\nimport { RedisSubscriber } from './redis';\nimport { fetchUpdateInfosWithRawUpdateInfos } from '../creators/update-creator';\nimport { jsonEndpoints } from '../endpoints';\n@@ -157,8 +156,6 @@ class Socket {\nviewer: ?Viewer;\nredis: ?RedisSubscriber;\n- updateActivityTimeIntervalID: ?IntervalID;\n-\nstateCheckConditions: StateCheckConditions = {\nactivityRecentlyOccurred: true,\nstateCheckOngoing: false,\n@@ -340,14 +337,6 @@ class Socket {\n};\nonClose = async () => {\n- const { updateActivityTimeIntervalID } = this;\n- if (\n- updateActivityTimeIntervalID !== null &&\n- updateActivityTimeIntervalID !== undefined\n- ) {\n- clearInterval(updateActivityTimeIntervalID);\n- this.updateActivityTimeIntervalID = null;\n- }\nthis.clearStateCheckTimeout();\nthis.resetTimeout.cancel();\nthis.debouncedAfterActivity.cancel();\n@@ -600,6 +589,7 @@ class Socket {\nasync handlePingClientSocketMessage(\nmessage: PingClientSocketMessage,\n): Promise<ServerSocketMessage[]> {\n+ this.updateActivityTime();\nreturn [\n{\ntype: serverSocketMessageTypes.PONG,\n@@ -716,18 +706,14 @@ class Socket {\nif (this.ws.readyState !== 1) {\nreturn;\n}\n- this.updateActivityTimeIntervalID = setInterval(\n- this.updateActivityTime,\n- focusedTableRefreshFrequency,\n- );\nthis.handleStateCheckConditionsUpdate();\n}\n- updateActivityTime = () => {\n+ updateActivityTime() {\nconst { viewer } = this;\ninvariant(viewer, 'should be set');\nhandleAsyncPromise(updateActivityTime(viewer));\n- };\n+ }\n// The Socket will timeout by calling this.ws.terminate()\n// serverRequestSocketTimeout milliseconds after the last\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [server] Call updateActivityTime on every ping from the client
Instead of just doing it until the socket is closed. This avoids extending `focused` rows if the connection "goes away" |
129,187 | 01.07.2020 22:41:25 | 14,400 | 0f09f9d1c3e34f1a056a1392e7cf051815254277 | Fix security issue with kind-of package
CVE-2019-20149 | [
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "@@ -8826,9 +8826,9 @@ kind-of@^5.0.0:\nintegrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==\nkind-of@^6.0.0, kind-of@^6.0.2:\n- version \"6.0.2\"\n- resolved \"https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051\"\n- integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==\n+ version \"6.0.3\"\n+ resolved \"https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd\"\n+ integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==\nklaw-sync@^6.0.0:\nversion \"6.0.0\"\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | Fix security issue with kind-of package
CVE-2019-20149 |
129,187 | 02.07.2020 14:18:55 | 14,400 | d36a3bff77c8e74df691500e9638b737fbf1d0ef | [web] Dock tabs to the top of the ThreadList | [
{
"change_type": "MODIFY",
"old_path": "web/chat/chat-tabs.css",
"new_path": "web/chat/chat-tabs.css",
"diff": "@@ -3,9 +3,10 @@ div.container {\nwidth: 400px;\ntop: 0;\nbottom: 0;\n- overflow-y: auto;\nbackground-color: white;\nborder-right: 2px solid #E4E4E4;\n+ display: flex;\n+ flex-direction: column;\n}\ndiv.tabs {\n@@ -30,6 +31,11 @@ div.tabItemInactive {\nmargin-bottom: -1px;\n}\n+div.threadList {\n+ flex: 1;\n+ overflow-y: auto;\n+}\n+\ndiv.emptyItem {\npadding: 10px;\nfont-size: 16px;\n"
},
{
"change_type": "MODIFY",
"old_path": "web/chat/chat-tabs.react.js",
"new_path": "web/chat/chat-tabs.react.js",
"diff": "@@ -40,7 +40,7 @@ class ChatTabs extends React.PureComponent<Props, State> {\nonClick={this.onClickTabItem}\n/>\n</div>\n- <div>{threadList}</div>\n+ <div className={css.threadList}>{threadList}</div>\n</div>\n);\n}\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [web] Dock tabs to the top of the ThreadList |
129,187 | 02.07.2020 13:23:10 | 14,400 | b137575a59c38f394e0700c2f77bbdcb5ab73cd6 | [native] iOS changes for React Native 0.62
Following instructions here:
Not sure if any of this is really necessary but I figured it wouldn't hurt. Putting it in a separate commit so we can revert it later if it causes problems | [
{
"change_type": "MODIFY",
"old_path": "native/ios/SquadCal.xcodeproj/project.pbxproj",
"new_path": "native/ios/SquadCal.xcodeproj/project.pbxproj",
"diff": "83CBB9F71A601CBA00E9B192 /* Project object */ = {\nisa = PBXProject;\nattributes = {\n- LastUpgradeCheck = 1140;\n+ LastUpgradeCheck = 1150;\nORGANIZATIONNAME = SquadCal;\nTargetAttributes = {\n13B07F861A680F5B00A75B9A = {\nisa = XCBuildConfiguration;\nbuildSettings = {\nALWAYS_SEARCH_USER_PATHS = NO;\n+ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;\nCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\nCLANG_CXX_LIBRARY = \"libc++\";\nCLANG_ENABLE_MODULES = YES;\nCLANG_ENABLE_OBJC_ARC = YES;\n+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\nCLANG_WARN_BOOL_CONVERSION = YES;\n+ CLANG_WARN_COMMA = YES;\nCLANG_WARN_CONSTANT_CONVERSION = YES;\n+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\nCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\nCLANG_WARN_EMPTY_BODY = YES;\nCLANG_WARN_ENUM_CONVERSION = YES;\n+ CLANG_WARN_INFINITE_RECURSION = YES;\nCLANG_WARN_INT_CONVERSION = YES;\n+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\nCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n+ CLANG_WARN_STRICT_PROTOTYPES = YES;\n+ CLANG_WARN_SUSPICIOUS_MOVE = YES;\nCLANG_WARN_UNREACHABLE_CODE = YES;\nCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCOPY_PHASE_STRIP = NO;\nENABLE_STRICT_OBJC_MSGSEND = YES;\n+ ENABLE_TESTABILITY = YES;\nGCC_C_LANGUAGE_STANDARD = gnu99;\nGCC_DYNAMIC_NO_PIC = NO;\n+ GCC_NO_COMMON_BLOCKS = YES;\nGCC_OPTIMIZATION_LEVEL = 0;\nGCC_PREPROCESSOR_DEFINITIONS = (\n\"DEBUG=1\",\nisa = XCBuildConfiguration;\nbuildSettings = {\nALWAYS_SEARCH_USER_PATHS = NO;\n+ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;\nCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\nCLANG_CXX_LIBRARY = \"libc++\";\nCLANG_ENABLE_MODULES = YES;\nCLANG_ENABLE_OBJC_ARC = YES;\n+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\nCLANG_WARN_BOOL_CONVERSION = YES;\n+ CLANG_WARN_COMMA = YES;\nCLANG_WARN_CONSTANT_CONVERSION = YES;\n+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\nCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\nCLANG_WARN_EMPTY_BODY = YES;\nCLANG_WARN_ENUM_CONVERSION = YES;\n+ CLANG_WARN_INFINITE_RECURSION = YES;\nCLANG_WARN_INT_CONVERSION = YES;\n+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\nCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n+ CLANG_WARN_STRICT_PROTOTYPES = YES;\n+ CLANG_WARN_SUSPICIOUS_MOVE = YES;\nCLANG_WARN_UNREACHABLE_CODE = YES;\nCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nENABLE_NS_ASSERTIONS = NO;\nENABLE_STRICT_OBJC_MSGSEND = YES;\nGCC_C_LANGUAGE_STANDARD = gnu99;\n+ GCC_NO_COMMON_BLOCKS = YES;\nGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\nGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\nGCC_WARN_UNDECLARED_SELECTOR = YES;\nIPHONEOS_DEPLOYMENT_TARGET = 9.0;\nMTL_ENABLE_DEBUG_INFO = NO;\nSDKROOT = iphoneos;\n+ SWIFT_COMPILATION_MODE = wholemodule;\nVALIDATE_PRODUCT = YES;\n};\nname = Release;\n"
},
{
"change_type": "MODIFY",
"old_path": "native/ios/SquadCal.xcodeproj/xcshareddata/xcschemes/SquadCal.xcscheme",
"new_path": "native/ios/SquadCal.xcodeproj/xcshareddata/xcschemes/SquadCal.xcscheme",
"diff": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n- LastUpgradeVersion = \"1140\"\n+ LastUpgradeVersion = \"1150\"\nversion = \"1.3\">\n<BuildAction\n- parallelizeBuildables = \"NO\"\n+ parallelizeBuildables = \"YES\"\nbuildImplicitDependencies = \"YES\">\n<BuildActionEntries>\n<BuildActionEntry\nReferencedContainer = \"container:Pods/Pods.xcodeproj\">\n</BuildableReference>\n</BuildActionEntry>\n- <BuildActionEntry\n- buildForTesting = \"YES\"\n- buildForRunning = \"YES\"\n- buildForProfiling = \"YES\"\n- buildForArchiving = \"YES\"\n- buildForAnalyzing = \"YES\">\n- <BuildableReference\n- BuildableIdentifier = \"primary\"\n- BlueprintIdentifier = \"83CBBA2D1A601D0E00E9B192\"\n- BuildableName = \"libReact.a\"\n- BlueprintName = \"React\"\n- ReferencedContainer = \"container:../node_modules/react-native/React/React.xcodeproj\">\n- </BuildableReference>\n- </BuildActionEntry>\n<BuildActionEntry\nbuildForTesting = \"YES\"\nbuildForRunning = \"YES\"\nReferencedContainer = \"container:SquadCal.xcodeproj\">\n</BuildableReference>\n</BuildActionEntry>\n- <BuildActionEntry\n- buildForTesting = \"YES\"\n- buildForRunning = \"YES\"\n- buildForProfiling = \"NO\"\n- buildForArchiving = \"NO\"\n- buildForAnalyzing = \"YES\">\n- <BuildableReference\n- BuildableIdentifier = \"primary\"\n- BlueprintIdentifier = \"00E356ED1AD99517003FC87E\"\n- BuildableName = \"SquadCalTests.xctest\"\n- BlueprintName = \"SquadCalTests\"\n- ReferencedContainer = \"container:SquadCal.xcodeproj\">\n- </BuildableReference>\n- </BuildActionEntry>\n</BuildActionEntries>\n</BuildAction>\n- <TestAction\n- buildConfiguration = \"Debug\"\n- selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n- selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n- shouldUseLaunchSchemeArgsEnv = \"YES\">\n- <MacroExpansion>\n- <BuildableReference\n- BuildableIdentifier = \"primary\"\n- BlueprintIdentifier = \"13B07F861A680F5B00A75B9A\"\n- BuildableName = \"SquadCal.app\"\n- BlueprintName = \"SquadCal\"\n- ReferencedContainer = \"container:SquadCal.xcodeproj\">\n- </BuildableReference>\n- </MacroExpansion>\n- <Testables>\n- <TestableReference\n- skipped = \"NO\">\n- <BuildableReference\n- BuildableIdentifier = \"primary\"\n- BlueprintIdentifier = \"00E356ED1AD99517003FC87E\"\n- BuildableName = \"SquadCalTests.xctest\"\n- BlueprintName = \"SquadCalTests\"\n- ReferencedContainer = \"container:SquadCal.xcodeproj\">\n- </BuildableReference>\n- </TestableReference>\n- </Testables>\n- </TestAction>\n<LaunchAction\nbuildConfiguration = \"Debug\"\nselectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] iOS changes for React Native 0.62
Following instructions here: https://github.com/react-native-community/upgrade-support/issues/13
Not sure if any of this is really necessary but I figured it wouldn't hurt. Putting it in a separate commit so we can revert it later if it causes problems |
129,187 | 03.07.2020 15:59:50 | 14,400 | 1461100d2a5a6b726ba704db08a39338143dfc8b | [native] Update expo packages to Expo 38
We can finally remove `@react-native-community/cameraroll` | [
{
"change_type": "MODIFY",
"old_path": "native/ios/Podfile.lock",
"new_path": "native/ios/Podfile.lock",
"diff": "@@ -15,11 +15,11 @@ PODS:\n- React-Core\n- UMCore\n- UMImageLoaderInterface\n- - EXImageManipulator (8.1.0):\n+ - EXImageManipulator (8.2.1):\n- UMCore\n- UMFileSystemInterface\n- UMImageLoaderInterface\n- - EXMediaLibrary (8.2.1):\n+ - EXMediaLibrary (8.3.0):\n- React\n- UMCore\n- UMFileSystemInterface\n@@ -27,7 +27,7 @@ PODS:\n- EXPermissions (8.1.0):\n- UMCore\n- UMPermissionsInterface\n- - EXSplashScreen (0.2.3):\n+ - EXSplashScreen (0.3.1):\n- UMCore\n- FBLazyVector (0.62.2)\n- FBReactNativeSpec (0.62.2):\n@@ -283,8 +283,6 @@ PODS:\n- React\n- react-native-camera/RN (3.8.0):\n- React\n- - react-native-cameraroll (1.5.2):\n- - React\n- react-native-ffmpeg/min-lts (0.4.4):\n- mobile-ffmpeg-min (= 4.3.1.LTS)\n- React\n@@ -473,7 +471,6 @@ DEPENDENCIES:\n- React-jsinspector (from `../../node_modules/react-native/ReactCommon/jsinspector`)\n- react-native-background-upload (from `../../node_modules/react-native-background-upload`)\n- react-native-camera (from `../../node_modules/react-native-camera`)\n- - \"react-native-cameraroll (from `../../node_modules/@react-native-community/cameraroll`)\"\n- react-native-ffmpeg/min-lts (from `../../node_modules/react-native-ffmpeg/react-native-ffmpeg.podspec`)\n- react-native-in-app-message (from `../../node_modules/react-native-in-app-message`)\n- \"react-native-netinfo (from `../../node_modules/@react-native-community/netinfo`)\"\n@@ -597,8 +594,6 @@ EXTERNAL SOURCES:\n:path: \"../../node_modules/react-native-background-upload\"\nreact-native-camera:\n:path: \"../../node_modules/react-native-camera\"\n- react-native-cameraroll:\n- :path: \"../../node_modules/@react-native-community/cameraroll\"\nreact-native-ffmpeg:\n:podspec: \"../../node_modules/react-native-ffmpeg/react-native-ffmpeg.podspec\"\nreact-native-in-app-message:\n@@ -707,10 +702,10 @@ SPEC CHECKSUMS:\nEXConstants: 5304709b1bea70a4828f48ba4c7fc3ec3b2d9b17\nEXFileSystem: cf4232ba7c62dc49b78c2d36005f97b6fddf0b01\nEXImageLoader: 5ad6896fa1ef2ee814b551873cbf7a7baccc694a\n- EXImageManipulator: 97f61d14c292714d66884e83697e794f8cefe0b0\n- EXMediaLibrary: 267cf1daca04a4d71d20c5be0b82701fe6056a08\n+ EXImageManipulator: fbc0fff59cd398ebec3f3e9bedd4451375de2d5f\n+ EXMediaLibrary: 0bf8b552392a0ae3919482c1a0f56def9acbd881\nEXPermissions: 24b97f734ce9172d245a5be38ad9ccfcb6135964\n- EXSplashScreen: 6568daa178c8e17f2197d29cea858f0e0b61b695\n+ EXSplashScreen: c4ed5d39cd5dbc1329f8dec720e280276bafa28b\nFBLazyVector: 4aab18c93cd9546e4bfed752b4084585eca8b245\nFBReactNativeSpec: 5465d51ccfeecb7faa12f9ae0024f2044ce4044e\nFlipper: 6c1f484f9a88d30ab3e272800d53688439e50f69\n@@ -738,7 +733,6 @@ SPEC CHECKSUMS:\nReact-jsinspector: 512e560d0e985d0e8c479a54a4e5c147a9c83493\nreact-native-background-upload: 6e8ba7f41a6308231306bddc88f11da3b74c9de4\nreact-native-camera: 21cf4ed26cf432ceb1fae959aa6924943fd6f714\n- react-native-cameraroll: 4360c9faab50dc6844f56d222c2d0c7ef5f1fe92\nreact-native-ffmpeg: f9a60452aaa5d478aac205b248224994f3bde416\nreact-native-in-app-message: f91de5009620af01456531118264c93e249b83ec\nreact-native-netinfo: 6bb847e64f45a2d69c6173741111cfd95c669301\n@@ -792,4 +786,4 @@ SPEC CHECKSUMS:\nPODFILE CHECKSUM: f1c6bb62cf220aa637539c3349d07b350a42520d\n-COCOAPODS: 1.9.1\n+COCOAPODS: 1.9.3\n"
},
{
"change_type": "MODIFY",
"old_path": "native/package.json",
"new_path": "native/package.json",
"diff": "\"dependencies\": {\n\"@react-native-community/art\": \"^1.1.2\",\n\"@react-native-community/async-storage\": \"^1.6.1\",\n- \"@react-native-community/cameraroll\": \"^1.5.2\",\n\"@react-native-community/masked-view\": \"^0.1.10\",\n\"@react-native-community/netinfo\": \"^4.4.0\",\n\"@react-navigation/bottom-tabs\": \"^5.6.1\",\n\"@react-navigation/native\": \"^5.6.1\",\n\"@react-navigation/stack\": \"^5.6.2\",\n\"base-64\": \"^0.1.0\",\n- \"expo-image-manipulator\": \"^8.1.0\",\n- \"expo-media-library\": \"^8.2.1\",\n- \"expo-splash-screen\": \"^0.2.3\",\n+ \"expo-image-manipulator\": \"^8.2.1\",\n+ \"expo-media-library\": \"^8.3.0\",\n+ \"expo-splash-screen\": \"^0.3.1\",\n\"find-root\": \"^1.1.0\",\n\"hoist-non-react-statics\": \"^3.1.0\",\n\"invariant\": \"^2.2.4\",\n"
},
{
"change_type": "MODIFY",
"old_path": "native/react-native.config.js",
"new_path": "native/react-native.config.js",
"diff": "@@ -8,6 +8,5 @@ module.exports = {\nios: null,\n},\n},\n- '@react-native-community/cameraroll': { platforms: { android: null } },\n},\n};\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "resolved \"https://registry.yarnpkg.com/@react-native-community/async-storage/-/async-storage-1.6.2.tgz#a19ca7149c4dfe8216f2330e6b1ebfe2d075ef92\"\nintegrity sha512-EJGsbrHubK1mGxPjWB74AaHAd5m9I+Gg2RRPZzMK6org7QOU9WOBnIMFqoeVto3hKOaEPlk8NV74H6G34/2pZQ==\n-\"@react-native-community/cameraroll@^1.5.2\":\n- version \"1.5.2\"\n- resolved \"https://registry.yarnpkg.com/@react-native-community/cameraroll/-/cameraroll-1.5.2.tgz#6db66bd39816ef19051e024e44f31f4a8de5b3c1\"\n- integrity sha512-xrkrmcI5V8IzWoGQOqycs2YZRmGqASqZMDkjOzFFg6bCy95+OMquPnCmGdaUx1ONO1x6tsQSCv87xM/oL+9m/A==\n-\n\"@react-native-community/cli-debugger-ui@^4.9.0\":\nversion \"4.9.0\"\nresolved \"https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-4.9.0.tgz#4177764ba69243c97aa26829d59d9501acb2bd71\"\n@@ -6150,25 +6145,25 @@ expo-image-loader@~1.0.0:\nresolved \"https://registry.yarnpkg.com/expo-image-loader/-/expo-image-loader-1.0.1.tgz#a83e336768df4dfcb8909aebb6d8152e256d7a72\"\nintegrity sha512-v7ziP+UGj+LArEmP//XTaqi9iFWRa8LAShNoFwwnpPS9huM8q3I+P16xK+GTo+4bQa1pPSIFBUZ8KqwAc+k8mQ==\n-expo-image-manipulator@^8.1.0:\n- version \"8.1.0\"\n- resolved \"https://registry.yarnpkg.com/expo-image-manipulator/-/expo-image-manipulator-8.1.0.tgz#63ae66e1a65e5be8c6ee7036fe88d53af551853f\"\n- integrity sha512-ephPXtzEx32Js1SQ1B2IXdpi4Gn34DIMQGAOwrwOPfUuWXQX9jGxyX3tktIGMmQ7lHueVr0a8zdh6ME0YGHjkw==\n-\n-expo-media-library@^8.2.1:\n+expo-image-manipulator@^8.2.1:\nversion \"8.2.1\"\n- resolved \"https://registry.yarnpkg.com/expo-media-library/-/expo-media-library-8.2.1.tgz#2296298dfcf2b19b56c201cb62b2b67c197bede0\"\n- integrity sha512-V0XDewHE7MFgwNAUZlruAabMCxM9uf9FfmgKIcoolWq/HGTC0GmwqN1QZIrKEejkqQLJWbUP8HoBWGx7IXz3ng==\n+ resolved \"https://registry.yarnpkg.com/expo-image-manipulator/-/expo-image-manipulator-8.2.1.tgz#8b9c9dc40615f045d49b3a3d53e41e3dbede1777\"\n+ integrity sha512-xz8gG6NWAEDzPe4rbHJCpCrNpfHWh5GBghBRRB6waZs3IMFTvGK/gUyor53xl+9VLi0f/ypGeWPyxl25GeBkMw==\n+\n+expo-media-library@^8.3.0:\n+ version \"8.3.0\"\n+ resolved \"https://registry.yarnpkg.com/expo-media-library/-/expo-media-library-8.3.0.tgz#2f5278fea31fb43f8c0e973cbb365c61b225e441\"\n+ integrity sha512-7ktRLlolgDI7P3R3kLSj+KMzPABBMUmQQcKRwqyyzSmkq8tH48ywoNYOUFZMPs9iKpMmP/D58LKdJlbMBsP8/A==\nexpo-permissions@~8.1.0:\nversion \"8.1.0\"\nresolved \"https://registry.yarnpkg.com/expo-permissions/-/expo-permissions-8.1.0.tgz#a7f2ee91ba76ce3a467e7b10adaa9ca5201b226f\"\nintegrity sha512-QBHD+1J9+sGFnhoEGzMRchPweeEE0OJ9ehG/0l1BMRBA7qsLS9vRC1FTJ55NwjI0Kr4RTha9r6ZX1kZHT09f/w==\n-expo-splash-screen@^0.2.3:\n- version \"0.2.3\"\n- resolved \"https://registry.yarnpkg.com/expo-splash-screen/-/expo-splash-screen-0.2.3.tgz#3f913652596de128828499db3a6a9da1cb201d61\"\n- integrity sha512-gKSD+RqShvCopHJssw32ugKJcAT9zHGi6ZkhG3N+VvJSHisZcMFFMcQAzMPdt6IntGjOnib/f79NVCsl6pXyTA==\n+expo-splash-screen@^0.3.1:\n+ version \"0.3.1\"\n+ resolved \"https://registry.yarnpkg.com/expo-splash-screen/-/expo-splash-screen-0.3.1.tgz#4dd79d9d1ab8135281f7cc5889a68e3003223f37\"\n+ integrity sha512-j87n6utSq8irvx9dA3YvFwHsqT9c/Cc/QnmpZHB0g3mPh3QBWReKgR3x41tHnkLMKHAi9Au9D4k/o615kUNeDg==\ndependencies:\n\"@expo/configure-splash-screen\" \"~0.1.0\"\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Update expo packages to Expo 38
We can finally remove `@react-native-community/cameraroll` |
129,187 | 03.07.2020 16:00:39 | 14,400 | 225dcb44942c20b0f7228edbf57692a755a03445 | [native] Update TextInput PropType
React Native 0.62 uses some new Fiber class | [
{
"change_type": "MODIFY",
"old_path": "native/keyboard/keyboard-input-host.react.js",
"new_path": "native/keyboard/keyboard-input-host.react.js",
"diff": "@@ -41,7 +41,7 @@ type Props = {|\n|};\nclass KeyboardInputHost extends React.PureComponent<Props> {\nstatic propTypes = {\n- textInputRef: PropTypes.instanceOf(TextInput),\n+ textInputRef: PropTypes.object,\nstyles: PropTypes.objectOf(PropTypes.object).isRequired,\nactiveMessageList: PropTypes.string,\nkeyboardState: keyboardStatePropType,\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Update TextInput PropType
React Native 0.62 uses some new Fiber class |
129,187 | 03.07.2020 16:51:32 | 14,400 | d234b73dbecb55836e27444c43a62d9baa033f3d | [native] Add SplashThemeBase for Android
Should be a no-op. Let's us avoid repeating the base config in all of the different `styles.xml` | [
{
"change_type": "MODIFY",
"old_path": "native/android/app/src/main/res/values-w481dp-xxhdpi/styles.xml",
"new_path": "native/android/app/src/main/res/values-w481dp-xxhdpi/styles.xml",
"diff": "<resources>\n- <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n- <item name=\"android:editTextBackground\">@android:color/transparent</item>\n- </style>\n- <style name=\"SplashTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n- <item name=\"android:windowNoTitle\">true</item>\n- <item name=\"android:windowDrawsSystemBarBackgrounds\">false</item>\n+ <style name=\"SplashTheme\" parent=\"SplashThemeBase\">\n</style>\n</resources>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/android/app/src/main/res/values-w481dp-xxxhdpi/styles.xml",
"new_path": "native/android/app/src/main/res/values-w481dp-xxxhdpi/styles.xml",
"diff": "<resources>\n- <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n- <item name=\"android:editTextBackground\">@android:color/transparent</item>\n- </style>\n- <style name=\"SplashTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n- <item name=\"android:windowNoTitle\">true</item>\n- <item name=\"android:windowDrawsSystemBarBackgrounds\">false</item>\n+ <style name=\"SplashTheme\" parent=\"SplashThemeBase\">\n</style>\n</resources>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/android/app/src/main/res/values-w801dp-xhdpi/styles.xml",
"new_path": "native/android/app/src/main/res/values-w801dp-xhdpi/styles.xml",
"diff": "<resources>\n- <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n- <item name=\"android:editTextBackground\">@android:color/transparent</item>\n- </style>\n- <style name=\"SplashTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n- <item name=\"android:windowNoTitle\">true</item>\n- <item name=\"android:windowDrawsSystemBarBackgrounds\">false</item>\n+ <style name=\"SplashTheme\" parent=\"SplashThemeBase\">\n</style>\n</resources>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/android/app/src/main/res/values-w801dp/styles.xml",
"new_path": "native/android/app/src/main/res/values-w801dp/styles.xml",
"diff": "<resources>\n- <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n- <item name=\"android:editTextBackground\">@android:color/transparent</item>\n- </style>\n- <style name=\"SplashTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n- <item name=\"android:windowNoTitle\">true</item>\n- <item name=\"android:windowDrawsSystemBarBackgrounds\">false</item>\n+ <style name=\"SplashTheme\" parent=\"SplashThemeBase\">\n</style>\n</resources>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/android/app/src/main/res/values-w961dp-hdpi/styles.xml",
"new_path": "native/android/app/src/main/res/values-w961dp-hdpi/styles.xml",
"diff": "<resources>\n- <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n- <item name=\"android:editTextBackground\">@android:color/transparent</item>\n- </style>\n- <style name=\"SplashTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n- <item name=\"android:windowNoTitle\">true</item>\n- <item name=\"android:windowDrawsSystemBarBackgrounds\">false</item>\n+ <style name=\"SplashTheme\" parent=\"SplashThemeBase\">\n</style>\n</resources>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/android/app/src/main/res/values/styles.xml",
"new_path": "native/android/app/src/main/res/values/styles.xml",
"diff": "<style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n<item name=\"android:editTextBackground\">@android:color/transparent</item>\n</style>\n- <style name=\"SplashTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n- <item name=\"android:textColor\">#000000</item>\n+ <style name=\"SplashThemeBase\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n<item name=\"android:windowNoTitle\">true</item>\n- <item name=\"android:background\">@drawable/splashscreen_image</item>\n<item name=\"android:windowDrawsSystemBarBackgrounds\">false</item>\n</style>\n+ <style name=\"SplashTheme\" parent=\"SplashThemeBase\">\n+ <item name=\"android:background\">@drawable/splashscreen_image</item>\n+ <item name=\"android:textColor\">#000000</item>\n+ </style>\n</resources>\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Add SplashThemeBase for Android
Should be a no-op. Let's us avoid repeating the base config in all of the different `styles.xml` |
129,187 | 03.07.2020 22:21:11 | 14,400 | bd5e7303c8275358da971ee544b7e514992aba76 | [native] Fix SafeAreaView usage to consider bottom inset | [
{
"change_type": "MODIFY",
"old_path": "native/account/logged-out-modal.react.js",
"new_path": "native/account/logged-out-modal.react.js",
"diff": "@@ -29,6 +29,7 @@ import Icon from 'react-native-vector-icons/FontAwesome';\nimport OnePassword from 'react-native-onepassword';\nimport PropTypes from 'prop-types';\nimport _isEqual from 'lodash/fp/isEqual';\n+import { SafeAreaView } from 'react-native-safe-area-context';\nimport { fetchNewCookieFromNativeCredentials } from 'lib/utils/action-utils';\nimport {\n@@ -60,7 +61,6 @@ import {\nsetStateForContainer,\n} from '../utils/state-container';\nimport { LoggedOutModalRouteName } from '../navigation/route-names';\n-import SafeAreaView from '../components/safe-area-view.react';\nimport {\nconnectNav,\ntype NavContextType,\n@@ -72,6 +72,7 @@ const animatedSpec = {\nuseNativeDriver: false,\neasing: Easing.out(Easing.ease),\n};\n+const safeAreaEdges = ['top', 'bottom'];\ntype LoggedOutMode = 'loading' | 'prompt' | 'log-in' | 'register';\ntype Props = {\n@@ -602,36 +603,19 @@ class LoggedOutModal extends React.PureComponent<Props, State> {\n</Animated.View>\n);\n- // Man, you gotta wonder sometimes if React Native is really worth it.\n- // The iOS order causes some extremely strange layout bugs on Android.\n- // The Android order makes the buttons in prompt mode not clickable.\n- if (Platform.OS === 'ios') {\nreturn (\n<React.Fragment>\n{background}\n- <SafeAreaView style={styles.container}>\n+ <SafeAreaView style={styles.container} edges={safeAreaEdges}>\n+ <View style={styles.container}>\n{statusBar}\n{animatedContent}\n{buttons}\n{forgotPasswordLink}\n+ </View>\n</SafeAreaView>\n</React.Fragment>\n);\n- } else {\n- // https://github.com/facebook/react-native/issues/6785\n- const topContainerStyle = { height: this.props.dimensions.height };\n- return (\n- <View style={[styles.androidTopContainer, topContainerStyle]}>\n- {background}\n- <View style={styles.container}>\n- {statusBar}\n- {buttons}\n- {animatedContent}\n- {forgotPasswordLink}\n- </View>\n- </View>\n- );\n- }\n}\nlogInPanelContainerRef = (logInPanelContainer: ?LogInPanelContainer) => {\n@@ -681,9 +665,6 @@ class LoggedOutModal extends React.PureComponent<Props, State> {\n}\nconst styles = StyleSheet.create({\n- androidTopContainer: {\n- backgroundColor: 'transparent',\n- },\nanimationContainer: {\nflex: 1,\n},\n"
},
{
"change_type": "MODIFY",
"old_path": "native/account/verification-modal.react.js",
"new_path": "native/account/verification-modal.react.js",
"diff": "@@ -31,6 +31,7 @@ import Icon from 'react-native-vector-icons/FontAwesome';\nimport invariant from 'invariant';\nimport OnePassword from 'react-native-onepassword';\nimport PropTypes from 'prop-types';\n+import { SafeAreaView } from 'react-native-safe-area-context';\nimport { registerFetchKey } from 'lib/reducers/loading-reducer';\nimport { connect } from 'lib/utils/redux-utils';\n@@ -52,7 +53,6 @@ import {\nremoveKeyboardListener,\n} from '../keyboard/keyboard';\nimport { VerificationModalRouteName } from '../navigation/route-names';\n-import SafeAreaView from '../components/safe-area-view.react';\nimport {\nconnectNav,\ntype NavContextType,\n@@ -62,6 +62,7 @@ const animatedSpec = {\nuseNativeDriver: false,\neasing: Easing.out(Easing.ease),\n};\n+const safeAreaEdges = ['top', 'bottom'];\nexport type VerificationModalParams = {|\nverifyCode: string,\n@@ -447,10 +448,12 @@ class VerificationModal extends React.PureComponent<Props, State> {\nreturn (\n<React.Fragment>\n{background}\n- <SafeAreaView style={styles.container}>\n+ <SafeAreaView style={styles.container} edges={safeAreaEdges}>\n+ <View style={styles.container}>\n{statusBar}\n{animatedContent}\n{closeButton}\n+ </View>\n</SafeAreaView>\n</React.Fragment>\n);\n"
},
{
"change_type": "MODIFY",
"old_path": "native/calendar/calendar.react.js",
"new_path": "native/calendar/calendar.react.js",
"diff": "@@ -56,6 +56,7 @@ import _sum from 'lodash/fp/sum';\nimport _pickBy from 'lodash/fp/pickBy';\nimport _size from 'lodash/fp/size';\nimport _throttle from 'lodash/throttle';\n+import { SafeAreaView } from 'react-native-safe-area-context';\nimport { entryKey } from 'lib/shared/entry-utils';\nimport { dateString, prettyDate, dateFromString } from 'lib/utils/date-utils';\n@@ -91,7 +92,6 @@ import {\nThreadPickerModalRouteName,\n} from '../navigation/route-names';\nimport DisconnectedBar from '../navigation/disconnected-bar.react';\n-import SafeAreaView from '../components/safe-area-view.react';\nimport {\ntype Colors,\ncolorsPropType,\n@@ -122,6 +122,8 @@ type ExtraData = $ReadOnly<{|\nvisibleEntries: { [key: string]: boolean },\n|}>;\n+const safeAreaEdges = ['top'];\n+\ntype Props = {\nnavigation: TabNavigationProp<'Calendar'>,\nroute: NavigationRoute<'Calendar'>,\n@@ -748,7 +750,7 @@ class Calendar extends React.PureComponent<Props, State> {\n}\nconst disableInputBar = this.state.currentlyEditing.length === 0;\nreturn (\n- <SafeAreaView style={this.props.styles.container}>\n+ <SafeAreaView style={this.props.styles.container} edges={safeAreaEdges}>\n<DisconnectedBar visible={this.props.calendarActive} />\n<TextHeightMeasurer\ntextToMeasure={this.state.textToMeasure}\n"
},
{
"change_type": "DELETE",
"old_path": "native/components/safe-area-view.react.js",
"new_path": null,
"diff": "-// @flow\n-\n-import * as React from 'react';\n-import { View } from 'react-native';\n-import { SafeAreaView } from 'react-native-safe-area-context';\n-\n-const edges = ['top'];\n-\n-function InsetSafeAreaView(props: React.ElementProps<typeof View>) {\n- return <SafeAreaView edges={edges} {...props} />;\n-}\n-\n-export default InsetSafeAreaView;\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Fix SafeAreaView usage to consider bottom inset |
129,187 | 03.07.2020 22:53:59 | 14,400 | ca034a1b7e2c3aa9ae3360302018cb401680c2fa | [native] Use translucent status and navigation bars on Android | [
{
"change_type": "MODIFY",
"old_path": "native/account/logged-out-modal.react.js",
"new_path": "native/account/logged-out-modal.react.js",
"diff": "@@ -319,7 +319,7 @@ class LoggedOutModal extends React.PureComponent<Props, State> {\ndimensions: { height: windowHeight },\ncontentVerticalOffset,\n} = this.props;\n- let containerSize = Platform.OS === 'ios' ? 62 : 59; // header height\n+ let containerSize = Platform.OS === 'ios' ? 62 : 61; // header height\nif (mode === 'log-in') {\n// We need to make space for the reset password button on smaller devices\ncontainerSize += windowHeight < 600 ? 195 : 165;\n@@ -329,8 +329,8 @@ class LoggedOutModal extends React.PureComponent<Props, State> {\n} else {\n// This is arbitrary and artificial... actually centering just looks a bit\n// weird because the buttons are at the bottom. The reason it's different\n- // for iPhone X is because that's where LaunchScreen.xib places it and I'm\n- // not sure how to get AutoLayout to behave consistently with Yoga.\n+ // for iPhone X is because that's where LaunchScreen.storyboard places it\n+ // and I'm not sure how to get AutoLayout to behave consistently with Yoga\ncontainerSize += DeviceInfo.getConstants().isIPhoneX_deprecated ? 50 : 61;\n}\nconst contentHeight = windowHeight - contentVerticalOffset;\n"
},
{
"change_type": "MODIFY",
"old_path": "native/android/app/src/main/res/drawable/splash_header.xml",
"new_path": "native/android/app/src/main/res/drawable/splash_header.xml",
"diff": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<inset\nxmlns:android=\"http://schemas.android.com/apk/res/android\"\n- android:insetBottom=\"56dp\"\n- android:insetLeft=\"1dp\"\n+ android:insetBottom=\"80dp\"\n+ android:insetLeft=\"2dp\"\n>\n<bitmap\nandroid:src=\"@drawable/header\"\n"
},
{
"change_type": "MODIFY",
"old_path": "native/android/app/src/main/res/values/styles.xml",
"new_path": "native/android/app/src/main/res/values/styles.xml",
"diff": "<resources>\n<style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n<item name=\"android:editTextBackground\">@android:color/transparent</item>\n+ <item name=\"android:windowTranslucentStatus\">true</item>\n+ <item name=\"android:windowTranslucentNavigation\">true</item>\n</style>\n<style name=\"SplashThemeBase\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n<item name=\"android:windowNoTitle\">true</item>\n<item name=\"android:windowDrawsSystemBarBackgrounds\">false</item>\n+ <item name=\"android:windowTranslucentStatus\">true</item>\n+ <item name=\"android:windowTranslucentNavigation\">true</item>\n</style>\n<style name=\"SplashTheme\" parent=\"SplashThemeBase\">\n<item name=\"android:background\">@drawable/splashscreen_image</item>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/selectors/dimension-selectors.js",
"new_path": "native/selectors/dimension-selectors.js",
"diff": "@@ -32,11 +32,6 @@ const dimensionsSelector: (state: AppState) => Dimensions = createSelector(\n(dimensions: DimensionsInfo): Dimensions => {\nlet { height, width } = dimensions;\nheight -= contentBottomOffset;\n- if (Platform.OS === 'android') {\n- // Android starts the 0 pixel below the status bar height,\n- // but doesn't subtract it out of the dimensions\n- height -= statusBarHeight;\n- }\nreturn { height, width };\n},\n);\n@@ -48,9 +43,6 @@ const contentVerticalOffsetSelector: (\n) => number = createSelector(\n(state: AppState) => state.dimensions,\n(dimensions: DimensionsInfo): number => {\n- if (Platform.OS !== 'ios') {\n- return 0;\n- }\nconst { height, width } = dimensions;\nif (width > height) {\n// We don't display a status bar at all in landscape mode,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/splash.js",
"new_path": "native/splash.js",
"diff": "@@ -7,11 +7,15 @@ import type { AppState } from './redux/redux-setup';\nimport { Platform, PixelRatio } from 'react-native';\nimport { createSelector } from 'reselect';\n-import { dimensionsSelector } from './selectors/dimension-selectors';\n+import {\n+ dimensionsSelector,\n+ contentVerticalOffsetSelector,\n+} from './selectors/dimension-selectors';\nconst splashStyleSelector: (state: AppState) => ImageStyle = createSelector(\ndimensionsSelector,\n- (dimensions: Dimensions): ImageStyle => {\n+ contentVerticalOffsetSelector,\n+ (dimensions: Dimensions, contentVerticalOffset: number): ImageStyle => {\nif (Platform.OS !== 'android') {\nreturn null;\n}\n@@ -42,13 +46,13 @@ const splashStyleSelector: (state: AppState) => ImageStyle = createSelector(\n}\nconst splashHeight =\nwindowWidth <= 480 ? splashWidth * 2.5 : splashWidth * 2;\n+ const translateX = (-1 * (splashWidth - windowWidth)) / 2;\n+ const translateY =\n+ (-1 * (splashHeight - windowHeight)) / 2 + contentVerticalOffset;\nreturn {\nwidth: splashWidth,\nheight: splashHeight,\n- transform: [\n- { translateX: (-1 * (splashWidth - windowWidth)) / 2 },\n- { translateY: (-1 * (splashHeight - windowHeight)) / 2 },\n- ],\n+ transform: [{ translateX }, { translateY }],\n};\n},\n);\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Use translucent status and navigation bars on Android |
129,187 | 06.07.2020 12:35:05 | 14,400 | 4a71ca7ffc887ea1bac307f16c7aaf681777e0fc | [native] Add visibleOverlays to OverlayContext | [
{
"change_type": "MODIFY",
"old_path": "native/navigation/overlay-context.js",
"new_path": "native/navigation/overlay-context.js",
"diff": "@@ -6,19 +6,36 @@ import PropTypes from 'prop-types';\ntype ScrollBlockingModalStatus = 'open' | 'closed' | 'closing';\nexport type OverlayContextType = {|\n- position: Animated.Value,\n- isDismissing: boolean,\n- scrollBlockingModalStatus: ScrollBlockingModalStatus,\n- setScrollBlockingModalStatus: ScrollBlockingModalStatus => void,\n+ // position and isDismissing are local to the current route\n+ +position: Animated.Value,\n+ +isDismissing: boolean,\n+ // The rest are global to the entire OverlayNavigator\n+ +visibleOverlays: $ReadOnlyArray<{|\n+ +routeKey: string,\n+ +routeName: string,\n+ +position: Animated.Value,\n+ +presentedFrom: ?string,\n+ |}>,\n+ +scrollBlockingModalStatus: ScrollBlockingModalStatus,\n+ +setScrollBlockingModalStatus: ScrollBlockingModalStatus => void,\n|};\nconst OverlayContext: React.Context<?OverlayContextType> = React.createContext(\nnull,\n);\n-const overlayContextPropType = PropTypes.shape({\n// eslint-disable-next-line import/no-named-as-default-member\n- position: PropTypes.instanceOf(Animated.Value).isRequired,\n+const animatedValuePropType = PropTypes.instanceOf(Animated.Value);\n+const overlayContextPropType = PropTypes.shape({\n+ position: animatedValuePropType.isRequired,\nisDismissing: PropTypes.bool.isRequired,\n+ visibleOverlays: PropTypes.arrayOf(\n+ PropTypes.exact({\n+ routeKey: PropTypes.string.isRequired,\n+ routeName: PropTypes.string.isRequired,\n+ position: animatedValuePropType.isRequired,\n+ presentedFrom: PropTypes.string,\n+ }),\n+ ).isRequired,\nscrollBlockingModalStatus: PropTypes.oneOf(['open', 'closed', 'closing'])\n.isRequired,\nsetScrollBlockingModalStatus: PropTypes.func.isRequired,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/navigation/overlay-navigator.react.js",
"new_path": "native/navigation/overlay-navigator.react.js",
"diff": "@@ -21,7 +21,7 @@ import { values } from 'lib/utils/objects';\nimport OverlayRouter from './overlay-router';\nimport { OverlayContext } from './overlay-context';\n-import { scrollBlockingChatModals } from './route-names';\n+import { scrollBlockingChatModals, TabNavigatorRouteName } from './route-names';\n/* eslint-disable import/no-named-as-default-member */\nconst { Value, timing, cond, call, lessOrEq, block } = Animated;\n@@ -83,6 +83,31 @@ const OverlayNavigator = React.memo<Props>(\nconst prevScenesRef = React.useRef();\nconst prevScenes = prevScenesRef.current;\n+ const visibleOverlayEntryForNewScene = scene => {\n+ const { route } = scene;\n+ if (route.name === TabNavigatorRouteName) {\n+ // We don't consider the TabNavigator at the bottom to be an overlay\n+ return undefined;\n+ }\n+ const presentedFrom = route.params\n+ ? route.params.presentedFrom\n+ : undefined;\n+ return {\n+ routeKey: route.key,\n+ routeName: route.name,\n+ position: positions[route.key],\n+ presentedFrom,\n+ };\n+ };\n+\n+ const visibleOverlaysRef = React.useRef();\n+ if (!visibleOverlaysRef.current) {\n+ visibleOverlaysRef.current = scenes\n+ .map(visibleOverlayEntryForNewScene)\n+ .filter(Boolean);\n+ }\n+ let visibleOverlays = visibleOverlaysRef.current;\n+\n// The scrollBlockingModalStatus state gets incorporated into the\n// OverlayContext, but it's global to the navigator rather than local to\n// each screen. Note that we also include the setter in OverlayContext. We\n@@ -110,6 +135,7 @@ const OverlayNavigator = React.memo<Props>(\n...scene,\ncontext: {\n...scene.context,\n+ visibleOverlays,\nscrollBlockingModalStatus,\nsetScrollBlockingModalStatus,\n},\n@@ -174,6 +200,10 @@ const OverlayNavigator = React.memo<Props>(\nlet data = updatedSceneData[key];\nif (!data) {\n// A new route has been pushed\n+ const newVisibleOverlayEntry = visibleOverlayEntryForNewScene(scene);\n+ if (newVisibleOverlayEntry) {\n+ visibleOverlays = [...visibleOverlays, newVisibleOverlayEntry];\n+ }\nupdatedSceneData[key] = sceneDataForNewScene(scene);\nsceneDataChanged = true;\nqueueAnimation(key, 1);\n@@ -193,10 +223,7 @@ const OverlayNavigator = React.memo<Props>(\n// that if and when our scene is dismissed, the sceneData has the most\n// recent descriptor\n}\n- if (\n- scene.context.position !== data.context.position ||\n- scene.context.isDismissing !== data.context.isDismissing\n- ) {\n+ if (scene.context.isDismissing !== data.context.isDismissing) {\ndata = { ...data, context: { ...data.context, ...scene.context } };\ndataChanged = true;\n}\n@@ -235,14 +262,40 @@ const OverlayNavigator = React.memo<Props>(\nlisteners: [\ncond(\nlessOrEq(position, 0),\n- call([], () =>\n+ call([], () => {\n+ // This gets called when the scene is no longer visible and\n+ // handles cleaning up our data structures to remove it\n+ const curVisibleOverlays = visibleOverlaysRef.current;\n+ invariant(\n+ curVisibleOverlays,\n+ 'visibleOverlaysRef should be set',\n+ );\n+ const newVisibleOverlays = curVisibleOverlays.filter(\n+ overlay => overlay.routeKey !== key,\n+ );\n+ invariant(\n+ newVisibleOverlays.length < curVisibleOverlays.length,\n+ `could not find ${key} in visibleOverlays`,\n+ );\n+ visibleOverlaysRef.current = newVisibleOverlays;\nsetSceneData(curSceneData => {\n- const newSceneData = { ...curSceneData };\n- delete newSceneData[key];\n+ const newSceneData = {};\n+ for (let sceneKey in curSceneData) {\n+ if (sceneKey === key) {\n+ continue;\n+ }\n+ newSceneData[sceneKey] = {\n+ ...curSceneData[sceneKey],\n+ context: {\n+ ...curSceneData[sceneKey].context,\n+ visibleOverlays: newVisibleOverlays,\n+ },\n+ };\n+ }\nreturn newSceneData;\n+ });\n}),\n),\n- ),\n],\n};\nsceneDataChanged = true;\n@@ -250,6 +303,22 @@ const OverlayNavigator = React.memo<Props>(\n}\n}\n+ if (visibleOverlays !== visibleOverlaysRef.current) {\n+ // This indicates we have pushed a new route. Let's make sure every\n+ // sceneData has the updated visibleOverlays\n+ for (let sceneKey in updatedSceneData) {\n+ updatedSceneData[sceneKey] = {\n+ ...updatedSceneData[sceneKey],\n+ context: {\n+ ...updatedSceneData[sceneKey].context,\n+ visibleOverlays,\n+ },\n+ };\n+ }\n+ visibleOverlaysRef.current = visibleOverlays;\n+ sceneDataChanged = true;\n+ }\n+\nconst pendingAnimations = pendingAnimationsRef.current;\nReact.useEffect(() => {\nif (Object.keys(pendingAnimations).length === 0) {\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Add visibleOverlays to OverlayContext |
129,187 | 06.07.2020 12:35:39 | 14,400 | 43b4a5c1f395aa4f8aea918c6d18b9c4dc832aaf | [native] Fix MultimediaMessageMultimedia opacity while animating MultimediaModal | [
{
"change_type": "MODIFY",
"old_path": "native/chat/multimedia-message-multimedia.react.js",
"new_path": "native/chat/multimedia-message-multimedia.react.js",
"diff": "@@ -48,31 +48,9 @@ import {\n} from '../navigation/overlay-context';\n/* eslint-disable import/no-named-as-default-member */\n-const {\n- Value,\n- set,\n- block,\n- cond,\n- eq,\n- greaterThan,\n- and,\n- sub,\n- multiply,\n- interpolate,\n- Extrapolate,\n-} = Animated;\n+const { Value, sub, interpolate, Extrapolate } = Animated;\n/* eslint-enable import/no-named-as-default-member */\n-function overlayJustCleared(overlayPosition: Value) {\n- const justCleared = new Value(0);\n- const prevValue = new Value(0);\n- return [\n- set(justCleared, and(greaterThan(prevValue, 0), eq(overlayPosition, 0))),\n- set(prevValue, overlayPosition),\n- justCleared,\n- ];\n-}\n-\ntype Props = {|\nmediaInfo: MediaInfo,\nitem: ChatMultimediaMessageInfoItem,\n@@ -92,7 +70,10 @@ type Props = {|\n// withOverlayContext\noverlayContext: ?OverlayContextType,\n|};\n-class MultimediaMessageMultimedia extends React.PureComponent<Props> {\n+type State = {|\n+ opacity: number | Value,\n+|};\n+class MultimediaMessageMultimedia extends React.PureComponent<Props, State> {\nstatic propTypes = {\nmediaInfo: mediaInfoPropType.isRequired,\nitem: chatMessageItemPropType.isRequired,\n@@ -110,12 +91,12 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props> {\n};\nview: ?React.ElementRef<typeof View>;\nclickable = true;\n- hidden = new Value(0);\n- opacity: Value;\nconstructor(props: Props) {\nsuper(props);\n- this.getOpacity();\n+ this.state = {\n+ opacity: this.getOpacity(),\n+ };\n}\nstatic getOverlayContext(props: Props) {\n@@ -127,50 +108,61 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props> {\nreturn overlayContext;\n}\n+ static getModalOverlayPosition(props: Props) {\n+ const overlayContext = MultimediaMessageMultimedia.getOverlayContext(props);\n+ const { visibleOverlays } = overlayContext;\n+ for (let overlay of visibleOverlays) {\n+ if (\n+ overlay.routeName === MultimediaModalRouteName &&\n+ overlay.presentedFrom === props.route.key\n+ ) {\n+ return overlay.position;\n+ }\n+ }\n+ return undefined;\n+ }\n+\ngetOpacity() {\n- const overlayPosition = MultimediaMessageMultimedia.getOverlayContext(\n+ const overlayPosition = MultimediaMessageMultimedia.getModalOverlayPosition(\nthis.props,\n- ).position;\n- this.opacity = block([\n- cond(overlayJustCleared(overlayPosition), set(this.hidden, 0)),\n- sub(\n+ );\n+ if (!overlayPosition) {\n+ return 1;\n+ }\n+ return sub(\n1,\n- multiply(\n- this.hidden,\ninterpolate(overlayPosition, {\ninputRange: [0.1, 0.11],\noutputRange: [0, 1],\nextrapolate: Extrapolate.CLAMP,\n}),\n- ),\n- ),\n- ]);\n+ );\n}\ncomponentDidUpdate(prevProps: Props) {\n- const overlayContext = MultimediaMessageMultimedia.getOverlayContext(\n+ const overlayPosition = MultimediaMessageMultimedia.getModalOverlayPosition(\nthis.props,\n);\n- const prevOverlayContext = MultimediaMessageMultimedia.getOverlayContext(\n+ const prevOverlayPosition = MultimediaMessageMultimedia.getModalOverlayPosition(\nprevProps,\n);\n-\n- if (overlayContext.position !== prevOverlayContext.position) {\n- this.getOpacity();\n+ if (overlayPosition !== prevOverlayPosition) {\n+ this.setState({ opacity: this.getOpacity() });\n}\nconst scrollIsDisabled =\n- overlayContext.scrollBlockingModalStatus !== 'closed';\n+ MultimediaMessageMultimedia.getOverlayContext(this.props)\n+ .scrollBlockingModalStatus !== 'closed';\nconst scrollWasDisabled =\n- prevOverlayContext.scrollBlockingModalStatus !== 'closed';\n+ MultimediaMessageMultimedia.getOverlayContext(prevProps)\n+ .scrollBlockingModalStatus !== 'closed';\nif (!scrollIsDisabled && scrollWasDisabled) {\nthis.clickable = true;\n- this.hidden.setValue(0);\n}\n}\nrender() {\n- const { opacity } = this;\n+ const { opacity } = this.state;\nconst wrapperStyles = [styles.container, { opacity }, this.props.style];\nconst { mediaInfo, pendingUpload, postInProgress } = this.props;\n@@ -232,7 +224,6 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props> {\nverticalBounds,\n},\n});\n- this.hidden.setValue(1);\n});\n};\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Fix MultimediaMessageMultimedia opacity while animating MultimediaModal |
129,187 | 06.07.2020 14:23:13 | 14,400 | 1f4d641b38eca57147133aa45b3bf94376006005 | [native] Avoid translucent status bar before Android 5
Earlier versions of Android don't allow changing the color of the status bar icons | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "native/android/app/src/main/res/values-v21/styles.xml",
"diff": "+<resources>\n+ <style name=\"AppTheme\" parent=\"AppThemeBase\">\n+ <item name=\"android:windowTranslucentStatus\">true</item>\n+ <item name=\"android:windowTranslucentNavigation\">true</item>\n+ </style>\n+ <style name=\"NoSplashTheme\" parent=\"SplashThemeBase\">\n+ <item name=\"android:windowTranslucentStatus\">true</item>\n+ <item name=\"android:windowTranslucentNavigation\">true</item>\n+ </style>\n+</resources>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/android/app/src/main/res/values-w481dp-xxhdpi/styles.xml",
"new_path": "native/android/app/src/main/res/values-w481dp-xxhdpi/styles.xml",
"diff": "<resources>\n- <style name=\"SplashTheme\" parent=\"SplashThemeBase\">\n+ <style name=\"SplashTheme\" parent=\"NoSplashTheme\">\n</style>\n</resources>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/android/app/src/main/res/values-w481dp-xxxhdpi/styles.xml",
"new_path": "native/android/app/src/main/res/values-w481dp-xxxhdpi/styles.xml",
"diff": "<resources>\n- <style name=\"SplashTheme\" parent=\"SplashThemeBase\">\n+ <style name=\"SplashTheme\" parent=\"NoSplashTheme\">\n</style>\n</resources>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/android/app/src/main/res/values-w801dp-xhdpi/styles.xml",
"new_path": "native/android/app/src/main/res/values-w801dp-xhdpi/styles.xml",
"diff": "<resources>\n- <style name=\"SplashTheme\" parent=\"SplashThemeBase\">\n+ <style name=\"SplashTheme\" parent=\"NoSplashTheme\">\n</style>\n</resources>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/android/app/src/main/res/values-w801dp/styles.xml",
"new_path": "native/android/app/src/main/res/values-w801dp/styles.xml",
"diff": "<resources>\n- <style name=\"SplashTheme\" parent=\"SplashThemeBase\">\n+ <style name=\"SplashTheme\" parent=\"NoSplashTheme\">\n</style>\n</resources>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/android/app/src/main/res/values-w961dp-hdpi/styles.xml",
"new_path": "native/android/app/src/main/res/values-w961dp-hdpi/styles.xml",
"diff": "<resources>\n- <style name=\"SplashTheme\" parent=\"SplashThemeBase\">\n+ <style name=\"SplashTheme\" parent=\"NoSplashTheme\">\n</style>\n</resources>\n"
},
{
"change_type": "DELETE",
"old_path": "native/android/app/src/main/res/values/colors.xml",
"new_path": null,
"diff": "-<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n-<resources>\n- <color name=\"primary_dark\">#000000</color>\n-</resources>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/android/app/src/main/res/values/styles.xml",
"new_path": "native/android/app/src/main/res/values/styles.xml",
"diff": "<resources>\n- <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n+ <style name=\"AppThemeBase\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n<item name=\"android:editTextBackground\">@android:color/transparent</item>\n- <item name=\"android:windowTranslucentStatus\">true</item>\n- <item name=\"android:windowTranslucentNavigation\">true</item>\n+ </style>\n+ <style name=\"AppTheme\" parent=\"AppThemeBase\">\n</style>\n<style name=\"SplashThemeBase\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n<item name=\"android:windowNoTitle\">true</item>\n<item name=\"android:windowDrawsSystemBarBackgrounds\">false</item>\n- <item name=\"android:windowTranslucentStatus\">true</item>\n- <item name=\"android:windowTranslucentNavigation\">true</item>\n</style>\n- <style name=\"SplashTheme\" parent=\"SplashThemeBase\">\n+ <style name=\"NoSplashTheme\" parent=\"SplashThemeBase\">\n+ </style>\n+ <style name=\"SplashTheme\" parent=\"NoSplashTheme\">\n<item name=\"android:background\">@drawable/splashscreen_image</item>\n<item name=\"android:textColor\">#000000</item>\n</style>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/selectors/dimension-selectors.js",
"new_path": "native/selectors/dimension-selectors.js",
"diff": "@@ -27,10 +27,17 @@ if (Platform.OS === 'android') {\n// iPhone X home pill\nconst contentBottomOffset = isIPhoneX ? 34 : 0;\n+const androidOpaqueStatus = Platform.OS === 'android' && Platform.Version < 21;\n+\nconst dimensionsSelector: (state: AppState) => Dimensions = createSelector(\n(state: AppState) => state.dimensions,\n(dimensions: DimensionsInfo): Dimensions => {\nlet { height, width } = dimensions;\n+ if (androidOpaqueStatus) {\n+ // Android always includes the status bar height,\n+ // even if the zero pixel starts below the status bar\n+ height -= statusBarHeight;\n+ }\nheight -= contentBottomOffset;\nreturn { height, width };\n},\n@@ -43,6 +50,9 @@ const contentVerticalOffsetSelector: (\n) => number = createSelector(\n(state: AppState) => state.dimensions,\n(dimensions: DimensionsInfo): number => {\n+ if (androidOpaqueStatus) {\n+ return 0;\n+ }\nconst { height, width } = dimensions;\nif (width > height) {\n// We don't display a status bar at all in landscape mode,\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Avoid translucent status bar before Android 5
Earlier versions of Android don't allow changing the color of the status bar icons |
129,187 | 06.07.2020 16:08:19 | 14,400 | 059c4517fdf68ab94b8ab1e4004b171362158034 | [native] Fix up positioning of header in Android splash screen
Works well on Android 4.4, 5.1, 6.0, and 10.0 now | [
{
"change_type": "MODIFY",
"old_path": "native/account/logged-out-modal.react.js",
"new_path": "native/account/logged-out-modal.react.js",
"diff": "@@ -319,7 +319,7 @@ class LoggedOutModal extends React.PureComponent<Props, State> {\ndimensions: { height: windowHeight },\ncontentVerticalOffset,\n} = this.props;\n- let containerSize = Platform.OS === 'ios' ? 62 : 61; // header height\n+ let containerSize = Platform.OS === 'ios' ? 62.33 : 58.54; // header height\nif (mode === 'log-in') {\n// We need to make space for the reset password button on smaller devices\ncontainerSize += windowHeight < 600 ? 195 : 165;\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "native/android/app/src/main/res/drawable-v21/splash_header.xml",
"diff": "+<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n+<inset\n+ xmlns:android=\"http://schemas.android.com/apk/res/android\"\n+ android:insetBottom=\"78dp\"\n+ android:insetLeft=\"2dp\"\n+>\n+ <bitmap\n+ android:src=\"@drawable/header\"\n+ android:width=\"177dp\"\n+ android:height=\"62dp\"\n+ android:gravity=\"center\"\n+ />\n+</inset>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/android/app/src/main/res/drawable/splash_header.xml",
"new_path": "native/android/app/src/main/res/drawable/splash_header.xml",
"diff": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<inset\nxmlns:android=\"http://schemas.android.com/apk/res/android\"\n- android:insetBottom=\"80dp\"\n- android:insetLeft=\"2dp\"\n+ android:insetBottom=\"56dp\"\n+ android:insetLeft=\"1dp\"\n>\n<bitmap\nandroid:src=\"@drawable/header\"\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Fix up positioning of header in Android splash screen
Works well on Android 4.4, 5.1, 6.0, and 10.0 now |
129,187 | 06.07.2020 16:37:12 | 14,400 | c9464e5c4e6fe333be98c3ae5da8aaa6bb9a2482 | [lib] Update background thread text | [
{
"change_type": "MODIFY",
"old_path": "native/chat/chat-thread-list.react.js",
"new_path": "native/chat/chat-thread-list.react.js",
"diff": "@@ -170,7 +170,7 @@ class ChatThreadList extends React.PureComponent<Props, State> {\n// but we don't care because we'll only ever be rendering this item by itself\n// and it should always be on-screen\nif (item.type === 'empty') {\n- return 129.5;\n+ return 123;\n}\nreturn 60;\n}\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [lib] Update background thread text |
129,187 | 08.07.2020 10:12:07 | 14,400 | d8c97b0a138d3fd251218980f4696e82e0266041 | [native] react-native-camera@^3.31.0 | [
{
"change_type": "MODIFY",
"old_path": "native/ios/Podfile.lock",
"new_path": "native/ios/Podfile.lock",
"diff": "@@ -275,13 +275,13 @@ PODS:\n- React-jsinspector (0.62.2)\n- react-native-background-upload (5.6.0):\n- React\n- - react-native-camera (3.8.0):\n+ - react-native-camera (3.31.0):\n- React\n- - react-native-camera/RCT (= 3.8.0)\n- - react-native-camera/RN (= 3.8.0)\n- - react-native-camera/RCT (3.8.0):\n+ - react-native-camera/RCT (= 3.31.0)\n+ - react-native-camera/RN (= 3.31.0)\n+ - react-native-camera/RCT (3.31.0):\n- React\n- - react-native-camera/RN (3.8.0):\n+ - react-native-camera/RN (3.31.0):\n- React\n- react-native-ffmpeg/min-lts (0.4.4):\n- mobile-ffmpeg-min (= 4.3.1.LTS)\n@@ -732,7 +732,7 @@ SPEC CHECKSUMS:\nReact-jsiexecutor: 1540d1c01bb493ae3124ed83351b1b6a155db7da\nReact-jsinspector: 512e560d0e985d0e8c479a54a4e5c147a9c83493\nreact-native-background-upload: 6e8ba7f41a6308231306bddc88f11da3b74c9de4\n- react-native-camera: 21cf4ed26cf432ceb1fae959aa6924943fd6f714\n+ react-native-camera: b5c8c7a71feecfdd5b39f0dbbf6b64b957ed55f2\nreact-native-ffmpeg: f9a60452aaa5d478aac205b248224994f3bde416\nreact-native-in-app-message: f91de5009620af01456531118264c93e249b83ec\nreact-native-netinfo: 6bb847e64f45a2d69c6173741111cfd95c669301\n"
},
{
"change_type": "MODIFY",
"old_path": "native/package.json",
"new_path": "native/package.json",
"diff": "\"react\": \"16.11.0\",\n\"react-native\": \"0.62.2\",\n\"react-native-background-upload\": \"^5.6.0\",\n- \"react-native-camera\": \"^3.8.0\",\n+ \"react-native-camera\": \"^3.31.0\",\n\"react-native-dark-mode\": \"^0.2.0-rc.1\",\n\"react-native-exit-app\": \"^1.1.0\",\n\"react-native-fast-image\": \"^7.0.2\",\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "@@ -12041,10 +12041,10 @@ react-native-background-upload@^5.6.0:\nresolved \"https://registry.yarnpkg.com/react-native-background-upload/-/react-native-background-upload-5.6.0.tgz#77953c78571c5c7d7a4885207743c6c462f22066\"\nintegrity sha512-JWtRVs3LIP41BFIEd01wit/O/hsGcGPDBYASZFal+0wPYJHjZZCVFOj2sEQ/NSOb4ow7RXtkYYJEKnQt+RiMPw==\n-react-native-camera@^3.8.0:\n- version \"3.8.0\"\n- resolved \"https://registry.yarnpkg.com/react-native-camera/-/react-native-camera-3.8.0.tgz#c2e6aaa62dc84e07180c3ea29a5bfc4d24b188a7\"\n- integrity sha512-8haG+GONkMaZPtGZcVy2gALn87vOZiPaWZ7I7V6H81WnVBy00Hcd9w1T8T1gdmxuVSFgV5gFKNjnYRc+xMe5pg==\n+react-native-camera@^3.31.0:\n+ version \"3.31.0\"\n+ resolved \"https://registry.yarnpkg.com/react-native-camera/-/react-native-camera-3.31.0.tgz#7b9b4dd30b6d1363bdffed4ce0a0bef93c3ebf87\"\n+ integrity sha512-TTuse7JGVUbh/cj+a4OfyXoPqhwPyYx+63tzJWZT0sWwZX5bvlxjYaEur/U1hiZZjOC03muEIMkTD7nYp6ZVFA==\ndependencies:\nprop-types \"^15.6.2\"\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] react-native-camera@^3.31.0 |
129,187 | 08.07.2020 15:04:15 | 14,400 | cd6d0a0d967f6e07a63d1fd66caa65ca9ba913c9 | [native] Fix crash when taking photo in CameraModal
Sigh... this was a bad bug. Introduced in because I foolishly didn't update `CameraModal`'s use of `SendMediaButton`. | [
{
"change_type": "MODIFY",
"old_path": "native/media/camera-modal.react.js",
"new_path": "native/media/camera-modal.react.js",
"diff": "@@ -31,9 +31,13 @@ import {\nTouchableOpacity,\nPlatform,\nImage,\n+ Animated,\n+ Easing,\n} from 'react-native';\nimport PropTypes from 'prop-types';\n-import Animated, { Easing } from 'react-native-reanimated';\n+import Reanimated, {\n+ Easing as ReanimatedEasing,\n+} from 'react-native-reanimated';\nimport { RNCamera } from 'react-native-camera';\nimport {\nPinchGestureHandler,\n@@ -92,7 +96,7 @@ const {\ntiming,\nspring,\nSpringUtils,\n-} = Animated;\n+} = Reanimated;\n/* eslint-enable import/no-named-as-default-member */\nconst maxZoom = 16;\n@@ -110,8 +114,13 @@ const zoomUpdateFactor = (() => {\n})();\nconst stagingModeAnimationConfig = {\n+ duration: 150,\n+ easing: ReanimatedEasing.inOut(ReanimatedEasing.ease),\n+};\n+const sendButtonAnimationConfig = {\nduration: 150,\neasing: Easing.inOut(Easing.ease),\n+ useNativeDriver: true,\n};\nconst indicatorSpringConfig = {\n@@ -122,7 +131,7 @@ const indicatorSpringConfig = {\n};\nconst indicatorTimingConfig = {\nduration: 500,\n- easing: Easing.out(Easing.ease),\n+ easing: ReanimatedEasing.out(ReanimatedEasing.ease),\ntoValue: 0,\n};\nfunction runIndicatorAnimation(\n@@ -318,7 +327,7 @@ class CameraModal extends React.PureComponent<Props, State> {\ncameraIDsFetched = false;\nstagingModeProgress = new Value(0);\n- sendButtonProgress = new Value(0);\n+ sendButtonProgress = new Animated.Value(0);\nsendButtonStyle: ViewStyle;\noverlayStyle: ViewStyle;\n@@ -335,7 +344,7 @@ class CameraModal extends React.PureComponent<Props, State> {\npendingPhotoCapture: undefined,\n};\n- const sendButtonScale = interpolate(this.sendButtonProgress, {\n+ const sendButtonScale = this.sendButtonProgress.interpolate({\ninputRange: [0, 1],\noutputRange: [1.1, 1],\n});\n@@ -575,8 +584,8 @@ class CameraModal extends React.PureComponent<Props, State> {\n}\nif (this.state.pendingPhotoCapture && !prevState.pendingPhotoCapture) {\n- timing(this.sendButtonProgress, {\n- ...stagingModeAnimationConfig,\n+ Animated.timing(this.sendButtonProgress, {\n+ ...sendButtonAnimationConfig,\ntoValue: 1,\n}).start();\n} else if (\n@@ -727,15 +736,15 @@ class CameraModal extends React.PureComponent<Props, State> {\nsimultaneousHandlers={this.tapHandler}\nref={this.pinchHandler}\n>\n- <Animated.View style={styles.fill}>\n+ <Reanimated.View style={styles.fill}>\n<TapGestureHandler\nonHandlerStateChange={this.tapEvent}\nsimultaneousHandlers={this.pinchHandler}\nwaitFor={this.pinchHandler}\nref={this.tapHandler}\n>\n- <Animated.View style={styles.fill}>\n- <Animated.View style={this.focusIndicatorStyle} />\n+ <Reanimated.View style={styles.fill}>\n+ <Reanimated.View style={this.focusIndicatorStyle} />\n<TouchableOpacity\nonPress={this.changeFlashMode}\nonLayout={this.onFlashButtonLayout}\n@@ -755,9 +764,9 @@ class CameraModal extends React.PureComponent<Props, State> {\n</TouchableOpacity>\n{switchCameraButton}\n</View>\n- </Animated.View>\n+ </Reanimated.View>\n</TapGestureHandler>\n- </Animated.View>\n+ </Reanimated.View>\n</PinchGestureHandler>\n);\n}\n@@ -770,9 +779,9 @@ class CameraModal extends React.PureComponent<Props, State> {\n? RNCamera.Constants.Type.front\n: RNCamera.Constants.Type.back;\nreturn (\n- <Animated.View style={this.containerStyle}>\n+ <Reanimated.View style={this.containerStyle}>\n{statusBar}\n- <Animated.Code exec={this.animationCode} />\n+ <Reanimated.Code exec={this.animationCode} />\n<RNCamera\ntype={type}\ncaptureAudio={false}\n@@ -786,8 +795,8 @@ class CameraModal extends React.PureComponent<Props, State> {\n>\n{this.renderCamera}\n</RNCamera>\n- <Animated.View style={this.overlayStyle} pointerEvents=\"none\" />\n- </Animated.View>\n+ <Reanimated.View style={this.overlayStyle} pointerEvents=\"none\" />\n+ </Reanimated.View>\n);\n}\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Fix crash when taking photo in CameraModal
Sigh... this was a bad bug. Introduced in cb547827bb47ac0a1ef95ddd9010d44faa1d7d74 because I foolishly didn't update `CameraModal`'s use of `SendMediaButton`. |
129,187 | 08.07.2020 12:32:32 | 14,400 | 9e6b6db9611b706f555eda23d8d7aa7061591c21 | [native] Inline some components in LoggedOutModal | [
{
"change_type": "MODIFY",
"old_path": "native/account/logged-out-modal.react.js",
"new_path": "native/account/logged-out-modal.react.js",
"diff": "@@ -502,14 +502,6 @@ class LoggedOutModal extends React.PureComponent<Props, State> {\n};\nrender() {\n- const statusBar = <ConnectedStatusBar barStyle=\"light-content\" />;\n- const background = (\n- <Image\n- source={{ uri: splashBackgroundURI }}\n- style={[styles.modalBackground, this.props.splashStyle]}\n- />\n- );\n-\nlet panel = null;\nlet buttons = null;\nif (this.state.mode === 'log-in') {\n@@ -603,12 +595,16 @@ class LoggedOutModal extends React.PureComponent<Props, State> {\n</Animated.View>\n);\n+ const backgroundSource = { uri: splashBackgroundURI };\nreturn (\n<React.Fragment>\n- {background}\n+ <ConnectedStatusBar barStyle=\"light-content\" />\n+ <Image\n+ source={backgroundSource}\n+ style={[styles.modalBackground, this.props.splashStyle]}\n+ />\n<SafeAreaView style={styles.container} edges={safeAreaEdges}>\n<View style={styles.container}>\n- {statusBar}\n{animatedContent}\n{buttons}\n{forgotPasswordLink}\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Inline some components in LoggedOutModal |
129,187 | 08.07.2020 21:30:09 | 14,400 | 3e8ab14ea114eeeef5ba716936adbc9fc5ef50b1 | [native] Fix style of chat thread list tab to match header
Elevation was creating this weird border/gap/shadow thing | [
{
"change_type": "MODIFY",
"old_path": "native/chat/chat.react.js",
"new_path": "native/chat/chat.react.js",
"diff": "@@ -55,6 +55,9 @@ const unboundStyles = {\nflex: 1,\nbackgroundColor: 'listBackground',\n},\n+ headerStyle: {\n+ elevation: 0,\n+ },\n};\nexport type ChatTopTabsNavigationProp<\n@@ -145,6 +148,7 @@ const chatThreadListOptions = ({ navigation }) => ({\n? () => <ComposeThreadButton navigate={navigation.navigate} />\n: undefined,\nheaderBackTitle: 'Back',\n+ headerStyle: unboundStyles.headerStyle,\n});\nconst messageListOptions = ({ navigation, route }) => ({\n// This is a render prop, not a component\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Fix style of chat thread list tab to match header
Elevation was creating this weird border/gap/shadow thing |
129,187 | 08.07.2020 21:30:51 | 14,400 | aac5577ca8c6dcd93e9a75623bc50b1a67ff7ec0 | [native] Set initialMetrics on SafeAreaProvider | [
{
"change_type": "MODIFY",
"old_path": "native/root.react.js",
"new_path": "native/root.react.js",
"diff": "@@ -10,7 +10,10 @@ import { PersistGate } from 'redux-persist/integration/react';\nimport AsyncStorage from '@react-native-community/async-storage';\nimport { NavigationContainer } from '@react-navigation/native';\nimport invariant from 'invariant';\n-import { SafeAreaProvider } from 'react-native-safe-area-context';\n+import {\n+ SafeAreaProvider,\n+ initialWindowMetrics,\n+} from 'react-native-safe-area-context';\nimport { useReduxDevToolsExtension } from '@react-navigation/devtools';\nimport { actionLogger } from 'lib/utils/action-logger';\n@@ -224,7 +227,7 @@ function Root() {\n<NavContext.Provider value={navContext}>\n<RootContext.Provider value={rootContext}>\n<InputStateContainer>\n- <SafeAreaProvider>\n+ <SafeAreaProvider initialMetrics={initialWindowMetrics}>\n<ConnectedStatusBar />\n<PersistGate persistor={getPersistor()}>{gated}</PersistGate>\n{navigation}\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Set initialMetrics on SafeAreaProvider |
129,187 | 08.07.2020 22:07:37 | 14,400 | aebac8d08bbc2632200dae8a9faa55f78b8d2dad | [native] Go to Home tab when Chat tab is pressed while already focused | [
{
"change_type": "MODIFY",
"old_path": "native/chat/background-chat-thread-list.react.js",
"new_path": "native/chat/background-chat-thread-list.react.js",
"diff": "// @flow\nimport type { ChatTopTabsNavigationProp } from './chat.react';\n+import type { NavigationRoute } from '../navigation/route-names';\nimport * as React from 'react';\nimport { useSelector } from 'react-redux';\n@@ -15,10 +16,10 @@ import { unreadBackgroundCount } from 'lib/selectors/thread-selectors';\nimport ChatThreadList from './chat-thread-list.react';\nimport { useStyles } from '../themes/colors';\n-type BackgroundChatThreadListProps = {\n+type BackgroundChatThreadListProps = {|\nnavigation: ChatTopTabsNavigationProp<'BackgroundChatThreadList'>,\n- ...\n-};\n+ route: NavigationRoute<'BackgroundChatThreadList'>,\n+|};\nexport default function BackgroundChatThreadList(\nprops: BackgroundChatThreadListProps,\n) {\n@@ -42,6 +43,7 @@ export default function BackgroundChatThreadList(\nreturn (\n<ChatThreadList\nnavigation={props.navigation}\n+ route={props.route}\nfilterThreads={threadInBackgroundChatList}\nemptyItem={EmptyItem}\n/>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/chat/chat-list.react.js",
"new_path": "native/chat/chat-list.react.js",
"diff": "@@ -111,8 +111,7 @@ class ChatList extends React.PureComponent<Props, State> {\n};\nget scrolledToBottom() {\n- const { scrollPos } = this;\n- return scrollPos === null || scrollPos === undefined || scrollPos <= 0;\n+ return this.scrollPos <= 0;\n}\ncomponentDidUpdate(prevProps: Props) {\n@@ -128,7 +127,7 @@ class ChatList extends React.PureComponent<Props, State> {\nreturn;\n}\n- const scrollPos = this.scrollPos ? this.scrollPos : 0;\n+ const { scrollPos } = this;\nlet curDataIndex = 0,\nprevDataIndex = 0,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/chat/chat-thread-list.react.js",
"new_path": "native/chat/chat-thread-list.react.js",
"diff": "@@ -30,6 +30,9 @@ import ChatThreadListItem from './chat-thread-list-item.react';\nimport {\nComposeThreadRouteName,\nMessageListRouteName,\n+ HomeChatThreadListRouteName,\n+ BackgroundChatThreadListRouteName,\n+ type NavigationRoute,\n} from '../navigation/route-names';\nimport { styleSelector } from '../themes/colors';\nimport Search from '../components/search.react';\n@@ -48,10 +51,10 @@ type Item =\n| {| type: 'search', searchText: string |}\n| {| type: 'empty', emptyItem: React.ComponentType<{||}> |};\n+type RouteNames = 'HomeChatThreadList' | 'BackgroundChatThreadList';\ntype Props = {|\n- navigation: ChatTopTabsNavigationProp<\n- 'HomeChatThreadList' | 'BackgroundChatThreadList',\n- >,\n+ navigation: ChatTopTabsNavigationProp<RouteNames>,\n+ route: NavigationRoute<RouteNames>,\nfilterThreads: (threadItem: ThreadInfo) => boolean,\nemptyItem?: React.ComponentType<{||}>,\n// Redux state\n@@ -85,6 +88,7 @@ class ChatThreadList extends React.PureComponent<Props, State> {\n};\nsearchInput: ?React.ElementRef<typeof TextInput>;\nflatList: ?FlatList<Item>;\n+ scrollPos = 0;\ncomponentDidMount() {\nconst chatNavigation: ?ChatNavigationProp<\n@@ -111,8 +115,13 @@ class ChatThreadList extends React.PureComponent<Props, State> {\n}\nonTabPress = () => {\n- if (this.props.navigation.isFocused() && this.flatList) {\n+ if (!this.props.navigation.isFocused()) {\n+ return;\n+ }\n+ if (this.scrollPos > 0 && this.flatList) {\nthis.flatList.scrollToOffset({ offset: 0, animated: true });\n+ } else if (this.props.route.name === BackgroundChatThreadListRouteName) {\n+ this.props.navigation.navigate({ name: HomeChatThreadListRouteName });\n}\n};\n@@ -239,6 +248,7 @@ class ChatThreadList extends React.PureComponent<Props, State> {\nextraData={this.props.viewerID}\ninitialNumToRender={11}\nkeyboardShouldPersistTaps=\"handled\"\n+ onScroll={this.onScroll}\nstyle={this.props.styles.flatList}\nref={this.flatListRef}\n/>\n@@ -251,6 +261,10 @@ class ChatThreadList extends React.PureComponent<Props, State> {\nthis.flatList = flatList;\n};\n+ onScroll = (event: { +nativeEvent: { +contentOffset: { +y: number } } }) => {\n+ this.scrollPos = event.nativeEvent.contentOffset.y;\n+ };\n+\nonChangeSearchText = (searchText: string) => {\nconst results = this.props.threadSearchIndex.getSearchResults(searchText);\nthis.setState({ searchText, searchResults: new Set(results) });\n"
},
{
"change_type": "MODIFY",
"old_path": "native/chat/home-chat-thread-list.react.js",
"new_path": "native/chat/home-chat-thread-list.react.js",
"diff": "// @flow\nimport type { ChatTopTabsNavigationProp } from './chat.react';\n+import type { NavigationRoute } from '../navigation/route-names';\nimport * as React from 'react';\n@@ -8,14 +9,15 @@ import { threadInHomeChatList } from 'lib/shared/thread-utils';\nimport ChatThreadList from './chat-thread-list.react';\n-type HomeChatThreadListProps = {\n+type HomeChatThreadListProps = {|\nnavigation: ChatTopTabsNavigationProp<'HomeChatThreadList'>,\n- ...\n-};\n+ route: NavigationRoute<'HomeChatThreadList'>,\n+|};\nexport default function HomeChatThreadList(props: HomeChatThreadListProps) {\nreturn (\n<ChatThreadList\nnavigation={props.navigation}\n+ route={props.route}\nfilterThreads={threadInHomeChatList}\n/>\n);\n"
},
{
"change_type": "MODIFY",
"old_path": "native/navigation/route-names.js",
"new_path": "native/navigation/route-names.js",
"diff": "@@ -30,8 +30,8 @@ export const MoreRouteName = 'More';\nexport const MoreScreenRouteName = 'MoreScreen';\nexport const ChatRouteName = 'Chat';\nexport const ChatThreadListRouteName = 'ChatThreadList';\n-export const HomeChatThreadListRouteName = 'HomeThreadList';\n-export const BackgroundChatThreadListRouteName = 'BackgroundThreadList';\n+export const HomeChatThreadListRouteName = 'HomeChatThreadList';\n+export const BackgroundChatThreadListRouteName = 'BackgroundChatThreadList';\nexport const CalendarRouteName = 'Calendar';\nexport const BuildInfoRouteName = 'BuildInfo';\nexport const DeleteAccountRouteName = 'DeleteAccount';\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Go to Home tab when Chat tab is pressed while already focused |
129,187 | 08.07.2020 22:36:16 | 14,400 | 9a9a35e72c0f1e5fbd3189a0f3fb2dffbe9d0771 | [native] codeVersion -> 55 | [
{
"change_type": "MODIFY",
"old_path": "native/android/app/build.gradle",
"new_path": "native/android/app/build.gradle",
"diff": "@@ -133,8 +133,8 @@ android {\napplicationId \"org.squadcal\"\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 54\n- versionName \"0.0.54\"\n+ versionCode 55\n+ versionName \"0.0.55\"\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "native/ios/SquadCal/Info.debug.plist",
"new_path": "native/ios/SquadCal/Info.debug.plist",
"diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>0.0.54</string>\n+ <string>0.0.55</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>54</string>\n+ <string>55</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/ios/SquadCal/Info.release.plist",
"new_path": "native/ios/SquadCal/Info.release.plist",
"diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>0.0.54</string>\n+ <string>0.0.55</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>54</string>\n+ <string>55</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/redux/persist.js",
"new_path": "native/redux/persist.js",
"diff": "@@ -178,7 +178,7 @@ const persistConfig = {\ntimeout: __DEV__ ? 0 : undefined,\n};\n-const codeVersion = 54;\n+const codeVersion = 55;\n// This local exists to avoid a circular dependency where redux-setup needs to\n// import all the navigation and screen stuff, but some of those screens want to\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] codeVersion -> 55 |
129,187 | 09.07.2020 07:57:54 | 14,400 | 755bf9e4320d02b329bf268281a992d2b1909996 | [native] Avoid behavior="height" on iOS KeyboardAvoidingView in Chat
Was causing weird issues | [
{
"change_type": "MODIFY",
"old_path": "native/chat/chat.react.js",
"new_path": "native/chat/chat.react.js",
"diff": "@@ -200,10 +200,14 @@ const Chat = createChatNavigator<\n>();\nexport default function ChatComponent() {\nconst styles = useStyles(unboundStyles);\n+ const behavior = Platform.select({\n+ android: 'height',\n+ default: 'padding',\n+ });\nreturn (\n<View style={styles.view}>\n<KeyboardAvoidingView\n- behavior=\"height\"\n+ behavior={behavior}\nstyle={styles.keyboardAvoidingView}\n>\n<Chat.Navigator screenOptions={screenOptions}>\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Avoid behavior="height" on iOS KeyboardAvoidingView in Chat
Was causing weird issues |
129,187 | 09.07.2020 10:50:29 | 14,400 | 2c14c3350e6281b781ac823d3fa298a651c4aee2 | [native] codeVersion -> 56
iOS-only release to fix | [
{
"change_type": "MODIFY",
"old_path": "native/android/app/build.gradle",
"new_path": "native/android/app/build.gradle",
"diff": "@@ -133,8 +133,8 @@ android {\napplicationId \"org.squadcal\"\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 55\n- versionName \"0.0.55\"\n+ versionCode 56\n+ versionName \"0.0.56\"\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "native/ios/SquadCal/Info.debug.plist",
"new_path": "native/ios/SquadCal/Info.debug.plist",
"diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>0.0.55</string>\n+ <string>0.0.56</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>55</string>\n+ <string>56</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/ios/SquadCal/Info.release.plist",
"new_path": "native/ios/SquadCal/Info.release.plist",
"diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>0.0.55</string>\n+ <string>0.0.56</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>55</string>\n+ <string>56</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/redux/persist.js",
"new_path": "native/redux/persist.js",
"diff": "@@ -178,7 +178,7 @@ const persistConfig = {\ntimeout: __DEV__ ? 0 : undefined,\n};\n-const codeVersion = 55;\n+const codeVersion = 56;\n// This local exists to avoid a circular dependency where redux-setup needs to\n// import all the navigation and screen stuff, but some of those screens want to\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] codeVersion -> 56
iOS-only release to fix 755bf9e4320d02b329bf268281a992d2b1909996 |
129,187 | 09.07.2020 11:44:16 | 14,400 | 7d034887743716c6aec4f804edd58657df2004a0 | [native] Continue hiding TabBar when keyboard is showing on Android 4.4 | [
{
"change_type": "MODIFY",
"old_path": "native/navigation/tab-bar.react.js",
"new_path": "native/navigation/tab-bar.react.js",
"diff": "@@ -11,6 +11,7 @@ import { useSafeArea } from 'react-native-safe-area-context';\nimport { KeyboardContext } from '../keyboard/keyboard-state';\nimport { updateDimensionsActiveType } from '../redux/action-types';\n+import { androidOpaqueStatus } from '../selectors/dimension-selectors';\n/* eslint-disable import/no-named-as-default-member */\nconst { Value, timing, interpolate } = Animated;\n@@ -25,7 +26,10 @@ function TabBar(props: Props) {\nconst tabBarVisible = tabBarVisibleRef.current;\nconst keyboardState = React.useContext(KeyboardContext);\n- const mediaGalleryOpen = keyboardState && keyboardState.mediaGalleryOpen;\n+ const shouldHideTabBar =\n+ keyboardState &&\n+ (keyboardState.mediaGalleryOpen ||\n+ (keyboardState.keyboardShowing && androidOpaqueStatus));\nconst animateTabBar = React.useCallback(\ntoValue =>\n@@ -37,16 +41,16 @@ function TabBar(props: Props) {\n[tabBarVisible],\n);\n- const mediaGalleryWasOpenRef = React.useRef(false);\n+ const prevShouldHideTabBarRef = React.useRef(false);\nReact.useEffect(() => {\n- const mediaGalleryWasOpen = mediaGalleryWasOpenRef.current;\n- if (mediaGalleryOpen && !mediaGalleryWasOpen) {\n+ const prevShouldHideTabBar = prevShouldHideTabBarRef.current;\n+ if (shouldHideTabBar && !prevShouldHideTabBar) {\nanimateTabBar(0);\n- } else if (!mediaGalleryOpen && mediaGalleryWasOpen) {\n+ } else if (!shouldHideTabBar && prevShouldHideTabBar) {\nanimateTabBar(1);\n}\n- mediaGalleryWasOpenRef.current = mediaGalleryOpen;\n- }, [mediaGalleryOpen, animateTabBar]);\n+ prevShouldHideTabBarRef.current = shouldHideTabBar;\n+ }, [shouldHideTabBar, animateTabBar]);\nconst reduxTabBarHeight = useSelector(state => state.dimensions.tabBarHeight);\nconst dispatch = useDispatch();\n"
},
{
"change_type": "MODIFY",
"old_path": "native/selectors/dimension-selectors.js",
"new_path": "native/selectors/dimension-selectors.js",
"diff": "@@ -66,6 +66,7 @@ const contentVerticalOffsetSelector: (\nconst defaultTabBarHeight = 50;\nexport {\n+ androidOpaqueStatus,\ncontentBottomOffset,\ndimensionsSelector,\ncontentVerticalOffsetSelector,\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Continue hiding TabBar when keyboard is showing on Android 4.4 |
129,187 | 10.07.2020 15:03:53 | 14,400 | f4f901f6dd3943b771ff593f184b2846f3c8b993 | [native] Fix KeyboardAvoidingView for Android 4.4
We should disable it since `android:windowSoftInputMode` is still active because `android:windowTranslucentStatus` is not set. | [
{
"change_type": "MODIFY",
"old_path": "native/android/app/src/main/AndroidManifest.xml",
"new_path": "native/android/app/src/main/AndroidManifest.xml",
"diff": "android:launchMode=\"singleTask\"\nandroid:label=\"@string/app_name\"\nandroid:configChanges=\"keyboard|keyboardHidden|orientation|screenSize|uiMode\"\n+ android:windowSoftInputMode=\"adjustResize\"\nandroid:exported=\"true\"\n>\n<intent-filter android:autoVerify=\"true\">\n"
},
{
"change_type": "MODIFY",
"old_path": "native/calendar/calendar.react.js",
"new_path": "native/calendar/calendar.react.js",
"diff": "@@ -43,7 +43,6 @@ import {\nPlatform,\nLayoutAnimation,\nTouchableWithoutFeedback,\n- KeyboardAvoidingView,\n} from 'react-native';\nimport PropTypes from 'prop-types';\nimport invariant from 'invariant';\n@@ -103,6 +102,7 @@ import {\nconnectNav,\ntype NavContextType,\n} from '../navigation/navigation-context';\n+import KeyboardAvoidingView from '../components/keyboard-avoiding-view.react';\nexport type EntryInfoWithHeight = {|\n...EntryInfo,\n@@ -1126,6 +1126,7 @@ const styles = {\nposition: 'absolute',\nleft: 0,\nright: 0,\n+ bottom: 0,\n},\nsectionHeader: {\nbackgroundColor: 'listSeparator',\n"
},
{
"change_type": "MODIFY",
"old_path": "native/chat/chat.react.js",
"new_path": "native/chat/chat.react.js",
"diff": "@@ -15,7 +15,7 @@ import {\ntype ExtraStackNavigatorProps,\n} from '@react-navigation/native';\nimport { StackView } from '@react-navigation/stack';\n-import { Platform, KeyboardAvoidingView, View } from 'react-native';\n+import { Platform, View } from 'react-native';\nimport invariant from 'invariant';\nimport HomeChatThreadList from './home-chat-thread-list.react';\n@@ -46,6 +46,7 @@ import MessageListHeaderTitle from './message-list-header-title.react';\nimport ThreadSettingsButton from './thread-settings-button.react';\nimport { InputStateContext } from '../input/input-state';\nimport { useStyles } from '../themes/colors';\n+import KeyboardAvoidingView from '../components/keyboard-avoiding-view.react';\nconst unboundStyles = {\nkeyboardAvoidingView: {\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "native/components/keyboard-avoiding-view.react.js",
"diff": "+// @flow\n+\n+import * as React from 'react';\n+import {\n+ KeyboardAvoidingView as BaseKeyboardAvoidingView,\n+ View,\n+} from 'react-native';\n+\n+import { androidOpaqueStatus } from '../selectors/dimension-selectors';\n+\n+type Props = React.ElementConfig<typeof BaseKeyboardAvoidingView>;\n+export default function KeyboardAvoidingView(props: Props) {\n+ if (!androidOpaqueStatus) {\n+ return <BaseKeyboardAvoidingView {...props} />;\n+ }\n+ const {\n+ behavior,\n+ contentContainerStyle,\n+ enabled,\n+ keyboardVerticalOffset,\n+ ...viewProps\n+ } = props;\n+ if (behavior !== 'position') {\n+ return <View {...viewProps} />;\n+ }\n+ const { children, ...restViewProps } = viewProps;\n+ return (\n+ <View {...restViewProps}>\n+ <View style={contentContainerStyle}>{children}</View>\n+ </View>\n+ );\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "native/components/modal.react.js",
"new_path": "native/components/modal.react.js",
"diff": "@@ -10,12 +10,12 @@ import {\nTouchableWithoutFeedback,\nViewPropTypes,\nStyleSheet,\n- KeyboardAvoidingView,\n} from 'react-native';\nimport PropTypes from 'prop-types';\nimport { connect } from 'lib/utils/redux-utils';\nimport { styleSelector } from '../themes/colors';\n+import KeyboardAvoidingView from './keyboard-avoiding-view.react';\ntype Props = $ReadOnly<{|\nnavigation: RootNavigationProp<>,\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Fix KeyboardAvoidingView for Android 4.4
We should disable it since `android:windowSoftInputMode` is still active because `android:windowTranslucentStatus` is not set. |
129,187 | 10.07.2020 19:21:58 | 14,400 | 0944d4833c3532b6b821f6216a932996fba202ef | [native] Fix up KeyboardAvoidingView to work with react-native-keyboard-input | [
{
"change_type": "MODIFY",
"old_path": "native/components/keyboard-avoiding-view.react.js",
"new_path": "native/components/keyboard-avoiding-view.react.js",
"diff": "// @flow\n+import type { Layout, LayoutEvent } from '../types/react-native';\n+import type { ScreenRect, KeyboardEvent } from '../keyboard/keyboard';\n+import type { ViewStyle } from '../types/styles';\n+import {\n+ type KeyboardState,\n+ withKeyboardState,\n+} from '../keyboard/keyboard-state';\n+\nimport * as React from 'react';\nimport {\n- KeyboardAvoidingView as BaseKeyboardAvoidingView,\nView,\n+ Keyboard,\n+ Platform,\n+ LayoutAnimation,\n+ StyleSheet,\n} from 'react-native';\n+import invariant from 'invariant';\nimport { androidOpaqueStatus } from '../selectors/dimension-selectors';\n-type Props = React.ElementConfig<typeof BaseKeyboardAvoidingView>;\n-export default function KeyboardAvoidingView(props: Props) {\n+type ViewProps = React.ElementConfig<typeof View>;\n+type Props = {|\n+ ...ViewProps,\n+ behavior: 'height' | 'position' | 'padding',\n+ contentContainerStyle?: ?ViewStyle,\n+ // withKeyboardState\n+ keyboardState: ?KeyboardState,\n+|};\n+function KeyboardAvoidingView(props: Props) {\nif (!androidOpaqueStatus) {\n- return <BaseKeyboardAvoidingView {...props} />;\n+ return <InnerKeyboardAvoidingView {...props} />;\n}\n+\nconst {\nbehavior,\ncontentContainerStyle,\n- enabled,\n- keyboardVerticalOffset,\n+ keyboardState,\n...viewProps\n} = props;\nif (behavior !== 'position') {\nreturn <View {...viewProps} />;\n}\n+\nconst { children, ...restViewProps } = viewProps;\nreturn (\n<View {...restViewProps}>\n@@ -30,3 +50,144 @@ export default function KeyboardAvoidingView(props: Props) {\n</View>\n);\n}\n+\n+type Subscription = { +remove: () => void };\n+type State = {|\n+ bottom: number,\n+|};\n+class InnerKeyboardAvoidingView extends React.PureComponent<Props, State> {\n+ state = {\n+ bottom: 0,\n+ };\n+ subscriptions: Subscription[] = [];\n+ viewFrame: ?Layout;\n+ keyboardFrame: ?ScreenRect;\n+ defaultViewFrameHeight = 0;\n+\n+ componentDidMount() {\n+ if (Platform.OS === 'ios') {\n+ this.subscriptions.push(\n+ Keyboard.addListener('keyboardWillChangeFrame', this.onKeyboardChange),\n+ );\n+ } else {\n+ this.subscriptions.push(\n+ Keyboard.addListener('keyboardDidHide', this.onKeyboardChange),\n+ Keyboard.addListener('keyboardDidShow', this.onKeyboardChange),\n+ );\n+ }\n+ }\n+\n+ componentWillUnmount() {\n+ for (const subscription of this.subscriptions) {\n+ subscription.remove();\n+ }\n+ }\n+\n+ onKeyboardChange = (event: ?KeyboardEvent) => {\n+ if (!event) {\n+ this.keyboardFrame = null;\n+ this.setState({ bottom: 0 });\n+ return;\n+ }\n+\n+ const { duration, easing, endCoordinates } = event;\n+ this.keyboardFrame = endCoordinates;\n+\n+ const { keyboardState } = this.props;\n+ const mediaGalleryOpen = keyboardState && keyboardState.mediaGalleryOpen;\n+ if (\n+ Platform.OS === 'android' &&\n+ !androidOpaqueStatus &&\n+ mediaGalleryOpen &&\n+ this.keyboardFrame.height > 0 &&\n+ this.viewFrame\n+ ) {\n+ this.viewFrame = {\n+ ...this.viewFrame,\n+ height: this.defaultViewFrameHeight,\n+ };\n+ }\n+\n+ const height = this.relativeKeyboardHeight;\n+ if (height === this.state.bottom) {\n+ return;\n+ }\n+ this.setState({ bottom: height });\n+\n+ if (duration && easing) {\n+ LayoutAnimation.configureNext({\n+ duration: duration > 10 ? duration : 10,\n+ update: {\n+ duration: duration > 10 ? duration : 10,\n+ type: LayoutAnimation.Types[easing] || 'keyboard',\n+ },\n+ });\n+ }\n+ };\n+\n+ get relativeKeyboardHeight() {\n+ const { viewFrame, keyboardFrame } = this;\n+ if (!viewFrame || !keyboardFrame) {\n+ return 0;\n+ }\n+ return Math.max(viewFrame.y + viewFrame.height - keyboardFrame.screenY, 0);\n+ }\n+\n+ onLayout = (event: LayoutEvent) => {\n+ this.viewFrame = event.nativeEvent.layout;\n+\n+ const { keyboardState } = this.props;\n+ const keyboardShowing = keyboardState && keyboardState.keyboardShowing;\n+ if (!keyboardShowing) {\n+ this.defaultViewFrameHeight = this.viewFrame.height;\n+ }\n+ };\n+\n+ render() {\n+ const {\n+ behavior,\n+ children,\n+ contentContainerStyle,\n+ style,\n+ keyboardState,\n+ ...props\n+ } = this.props;\n+ const { bottom } = this.state;\n+ if (behavior === 'height') {\n+ let heightStyle;\n+ if (this.viewFrame && bottom > 0) {\n+ heightStyle = {\n+ height: this.defaultViewFrameHeight - bottom,\n+ flex: 0,\n+ };\n+ }\n+ const composedStyle = StyleSheet.compose(style, heightStyle);\n+ return (\n+ <View style={composedStyle} onLayout={this.onLayout} {...props}>\n+ {children}\n+ </View>\n+ );\n+ } else if (behavior === 'position') {\n+ const composedStyle = StyleSheet.compose(contentContainerStyle, {\n+ bottom,\n+ });\n+ return (\n+ <View style={style} onLayout={this.onLayout} {...props}>\n+ <View style={composedStyle}>{children}</View>\n+ </View>\n+ );\n+ } else if (behavior === 'padding') {\n+ const composedStyle = StyleSheet.compose(style, {\n+ paddingBottom: bottom,\n+ });\n+ return (\n+ <View style={composedStyle} onLayout={this.onLayout} {...props}>\n+ {children}\n+ </View>\n+ );\n+ }\n+ invariant(false, `invalid KeyboardAvoidingView behavior ${behavior}`);\n+ }\n+}\n+\n+export default withKeyboardState(KeyboardAvoidingView);\n"
},
{
"change_type": "MODIFY",
"old_path": "native/keyboard/keyboard.js",
"new_path": "native/keyboard/keyboard.js",
"diff": "import { Keyboard, Platform, DeviceInfo } from 'react-native';\n-type ScreenRect = $ReadOnly<{|\n+export type ScreenRect = $ReadOnly<{|\nscreenX: number,\nscreenY: number,\nwidth: number,\n"
},
{
"change_type": "MODIFY",
"old_path": "native/navigation/tab-bar.react.js",
"new_path": "native/navigation/tab-bar.react.js",
"diff": "@@ -31,26 +31,40 @@ function TabBar(props: Props) {\n(keyboardState.mediaGalleryOpen ||\n(keyboardState.keyboardShowing && androidOpaqueStatus));\n- const animateTabBar = React.useCallback(\n- toValue =>\n+ const prevKeyboardStateRef = React.useRef();\n+ React.useEffect(() => {\n+ prevKeyboardStateRef.current = keyboardState;\n+ }, [keyboardState]);\n+ const prevKeyboardState = prevKeyboardStateRef.current;\n+\n+ const setTabBar = React.useCallback(\n+ toValue => {\n+ const keyboardIsShowing = keyboardState && keyboardState.keyboardShowing;\n+ const keyboardWasShowing =\n+ prevKeyboardState && prevKeyboardState.keyboardShowing;\n+ if (keyboardIsShowing === keyboardWasShowing) {\n+ tabBarVisible.setValue(toValue);\n+ return;\n+ }\ntiming(tabBarVisible, {\ntoValue,\nduration: 200,\neasing: Easing.inOut(Easing.ease),\n- }).start(),\n- [tabBarVisible],\n+ }).start();\n+ },\n+ [keyboardState, prevKeyboardState, tabBarVisible],\n);\nconst prevShouldHideTabBarRef = React.useRef(false);\nReact.useEffect(() => {\nconst prevShouldHideTabBar = prevShouldHideTabBarRef.current;\nif (shouldHideTabBar && !prevShouldHideTabBar) {\n- animateTabBar(0);\n+ setTabBar(0);\n} else if (!shouldHideTabBar && prevShouldHideTabBar) {\n- animateTabBar(1);\n+ setTabBar(1);\n}\nprevShouldHideTabBarRef.current = shouldHideTabBar;\n- }, [shouldHideTabBar, animateTabBar]);\n+ }, [shouldHideTabBar, setTabBar]);\nconst reduxTabBarHeight = useSelector(state => state.dimensions.tabBarHeight);\nconst dispatch = useDispatch();\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Fix up KeyboardAvoidingView to work with react-native-keyboard-input |
129,187 | 10.07.2020 22:38:25 | 14,400 | f4e846975d7a610038fd1f21b79a39305ce293bc | [native] Fix react-native-keyboard-input height calculation for android:windowTranslucentNavigation | [
{
"change_type": "MODIFY",
"old_path": "patches/react-native-keyboard-input+6.0.0.patch",
"new_path": "patches/react-native-keyboard-input+6.0.0.patch",
"diff": "@@ -10,6 +10,70 @@ index 46d2207..830c7b5 100644\npublic void onBeforeLayout(NativeViewHierarchyOptimizer nativeViewHierarchyOptimizer) {\nmLayout.setShadowNode(this);\n}\n+diff --git a/node_modules/react-native-keyboard-input/lib/android/src/main/java/com/wix/reactnativekeyboardinput/ReactSoftKeyboardMonitor.java b/node_modules/react-native-keyboard-input/lib/android/src/main/java/com/wix/reactnativekeyboardinput/ReactSoftKeyboardMonitor.java\n+index ae5e756..e861f64 100644\n+--- a/node_modules/react-native-keyboard-input/lib/android/src/main/java/com/wix/reactnativekeyboardinput/ReactSoftKeyboardMonitor.java\n++++ b/node_modules/react-native-keyboard-input/lib/android/src/main/java/com/wix/reactnativekeyboardinput/ReactSoftKeyboardMonitor.java\n+@@ -1,6 +1,11 @@\n+ package com.wix.reactnativekeyboardinput;\n+\n++import android.graphics.Point;\n+ import android.graphics.Rect;\n++import android.os.Build;\n++import android.util.Log;\n++import android.util.TypedValue;\n++import android.view.Display;\n+ import android.view.ViewTreeObserver;\n+\n+ import androidx.annotation.Nullable;\n+@@ -61,8 +66,28 @@ public class ReactSoftKeyboardMonitor implements ReactScreenMonitor.Listener {\n+ private Listener mExternalListener;\n+ private ReactRootView mLastReactRootView;\n+\n++ private int translucentNavBarHeight;\n++\n+ public ReactSoftKeyboardMonitor(ReactScreenMonitor screenMonitor) {\n+ screenMonitor.addListener(this);\n++\n++ this.translucentNavBarHeight = 0;\n++ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {\n++ return;\n++ }\n++\n++ TypedValue typedValue = new TypedValue();\n++ getWindow().getContext().getTheme().resolveAttribute(android.R.attr.windowTranslucentNavigation, typedValue, true);\n++ if (typedValue.data == 0) {\n++ return;\n++ }\n++\n++ Display defaultDisplay = getWindow().getWindowManager().getDefaultDisplay();\n++ Point size = new Point();\n++ defaultDisplay.getSize(size);\n++ Point realSize = new Point();\n++ defaultDisplay.getRealSize(realSize);\n++ this.translucentNavBarHeight = realSize.y - size.y;\n+ }\n+\n+ @Override\n+@@ -123,14 +148,14 @@ public class ReactSoftKeyboardMonitor implements ReactScreenMonitor.Listener {\n+ RuntimeUtils.runOnUIThread(new Runnable() {\n+ @Override\n+ public void run() {\n+- final Integer locallyVisibleHeight = getLocallyVisibleHeight();\n+- if (locallyVisibleHeight == null) {\n++ final Integer viewportVisibleHeight = getViewportVisibleHeight();\n++ if (viewportVisibleHeight == null) {\n+ // Too late to join the party - react-view seems to be gone...\n+ return;\n+ }\n+\n+- if (mLocallyVisibleHeight > locallyVisibleHeight) {\n+- mKeyboardHeight = mLocallyVisibleHeight - locallyVisibleHeight;\n++ if (mMaxViewportVisibleHeight > viewportVisibleHeight) {\n++ mKeyboardHeight = mMaxViewportVisibleHeight - viewportVisibleHeight + translucentNavBarHeight;\n+ }\n+ }\n+ });\ndiff --git a/node_modules/react-native-keyboard-input/lib/ios/RCTCustomInputController/RCTCustomInputController.m b/node_modules/react-native-keyboard-input/lib/ios/RCTCustomInputController/RCTCustomInputController.m\nindex 2a31b47..21090bf 100644\n--- a/node_modules/react-native-keyboard-input/lib/ios/RCTCustomInputController/RCTCustomInputController.m\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Fix react-native-keyboard-input height calculation for android:windowTranslucentNavigation |
129,187 | 10.07.2020 23:09:15 | 14,400 | 05d6831b71df015c83da604436801f9f5c7e11d1 | [native] Delay rendering KeyboardInputHost on Android until after TabBar hides | [
{
"change_type": "MODIFY",
"old_path": "native/keyboard/keyboard-state-container.react.js",
"new_path": "native/keyboard/keyboard-state-container.react.js",
"diff": "@@ -5,6 +5,8 @@ import PropTypes from 'prop-types';\nimport { KeyboardUtils } from 'react-native-keyboard-input';\nimport { Platform } from 'react-native';\n+import sleep from 'lib/utils/sleep';\n+\nimport {\naddKeyboardShowListener,\naddKeyboardDismissListener,\n@@ -12,6 +14,9 @@ import {\n} from './keyboard';\nimport { KeyboardContext } from './keyboard-state';\nimport KeyboardInputHost from './keyboard-input-host.react';\n+import { waitForInteractions } from '../utils/interactions';\n+import { androidOpaqueStatus } from '../selectors/dimension-selectors';\n+import { tabBarAnimationDuration } from '../navigation/tab-bar.react';\ntype Props = {|\nchildren: React.Node,\n@@ -20,6 +25,7 @@ type State = {|\nsystemKeyboardShowing: boolean,\nmediaGalleryOpen: boolean,\nmediaGalleryThreadID: ?string,\n+ renderKeyboardInputHost: boolean,\n|};\nclass KeyboardStateContainer extends React.PureComponent<Props, State> {\nstatic propTypes = {\n@@ -29,6 +35,7 @@ class KeyboardStateContainer extends React.PureComponent<Props, State> {\nsystemKeyboardShowing: false,\nmediaGalleryOpen: false,\nmediaGalleryThreadID: null,\n+ renderKeyboardInputHost: false,\n};\nkeyboardShowListener: ?Object;\nkeyboardDismissListener: ?Object;\n@@ -59,6 +66,19 @@ class KeyboardStateContainer extends React.PureComponent<Props, State> {\n}\n}\n+ componentDidUpdate(prevProps: Props, prevState: State) {\n+ if (Platform.OS !== 'android' || androidOpaqueStatus) {\n+ return;\n+ }\n+ if (this.state.mediaGalleryOpen && !prevState.mediaGalleryOpen) {\n+ (async () => {\n+ await sleep(tabBarAnimationDuration);\n+ await waitForInteractions();\n+ this.setState({ renderKeyboardInputHost: true });\n+ })();\n+ }\n+ }\n+\ndismissKeyboard = () => {\nKeyboardUtils.dismiss();\nthis.hideMediaGallery();\n@@ -78,17 +98,32 @@ class KeyboardStateContainer extends React.PureComponent<Props, State> {\n}\nshowMediaGallery = (threadID: string) => {\n- this.setState({ mediaGalleryOpen: true, mediaGalleryThreadID: threadID });\n+ const updates: $Shape<State> = {\n+ mediaGalleryOpen: true,\n+ mediaGalleryThreadID: threadID,\n+ };\n+ if (androidOpaqueStatus) {\n+ updates.renderKeyboardInputHost = true;\n+ }\n+ this.setState(updates);\n};\nhideMediaGallery = () => {\n- this.setState({ mediaGalleryOpen: false, mediaGalleryThreadID: null });\n+ this.setState({\n+ mediaGalleryOpen: false,\n+ mediaGalleryThreadID: null,\n+ renderKeyboardInputHost: false,\n+ });\n};\ngetMediaGalleryThreadID = () => this.state.mediaGalleryThreadID;\nrender() {\n- const { systemKeyboardShowing, mediaGalleryOpen } = this.state;\n+ const {\n+ systemKeyboardShowing,\n+ mediaGalleryOpen,\n+ renderKeyboardInputHost,\n+ } = this.state;\nconst {\nkeyboardShowing,\ndismissKeyboard,\n@@ -107,8 +142,7 @@ class KeyboardStateContainer extends React.PureComponent<Props, State> {\nhideMediaGallery,\ngetMediaGalleryThreadID,\n};\n- const keyboardInputHost =\n- Platform.OS === 'android' && mediaGalleryOpen ? (\n+ const keyboardInputHost = renderKeyboardInputHost ? (\n<KeyboardInputHost />\n) : null;\nreturn (\n"
},
{
"change_type": "MODIFY",
"old_path": "native/navigation/app-navigator.react.js",
"new_path": "native/navigation/app-navigator.react.js",
"diff": "@@ -35,7 +35,7 @@ import {\nimport Calendar from '../calendar/calendar.react';\nimport Chat from '../chat/chat.react';\nimport More from '../more/more.react';\n-import TabBar from './tab-bar.react';\n+import { tabBar } from './tab-bar.react';\nimport { createOverlayNavigator } from './overlay-navigator.react';\nimport MultimediaModal from '../media/multimedia-modal.react';\nimport { MultimediaTooltipModal } from '../chat/multimedia-tooltip-modal.react';\n@@ -85,7 +85,7 @@ function TabNavigator() {\n<Tab.Navigator\ninitialRouteName={ChatRouteName}\nlazy={false}\n- tabBar={TabBar}\n+ tabBar={tabBar}\nbackBehavior=\"none\"\ntabBarOptions={tabBarOptions}\n>\n"
},
{
"change_type": "MODIFY",
"old_path": "native/navigation/tab-bar.react.js",
"new_path": "native/navigation/tab-bar.react.js",
"diff": "@@ -17,6 +17,8 @@ import { androidOpaqueStatus } from '../selectors/dimension-selectors';\nconst { Value, timing, interpolate } = Animated;\n/* eslint-enable import/no-named-as-default-member */\n+const tabBarAnimationDuration = 200;\n+\ntype Props = React.ElementConfig<typeof BottomTabBar>;\nfunction TabBar(props: Props) {\nconst tabBarVisibleRef = new React.useRef();\n@@ -48,7 +50,7 @@ function TabBar(props: Props) {\n}\ntiming(tabBarVisible, {\ntoValue,\n- duration: 200,\n+ duration: tabBarAnimationDuration,\neasing: Easing.inOut(Easing.ease),\n}).start();\n},\n@@ -143,4 +145,6 @@ const styles = StyleSheet.create({\n// This is a render prop, not a component\n// eslint-disable-next-line react/display-name\n-export default (props: Props) => <TabBar {...props} />;\n+const tabBar = (props: Props) => <TabBar {...props} />;\n+\n+export { tabBarAnimationDuration, tabBar };\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Delay rendering KeyboardInputHost on Android until after TabBar hides |
129,187 | 12.07.2020 10:36:46 | 14,400 | 6c36fd543a47b124fa2471f5216273bf3b56a65a | [native] Set iOS gallery keyboard height regardless of system keyboard status | [
{
"change_type": "MODIFY",
"old_path": "native/chat/chat-input-bar.react.js",
"new_path": "native/chat/chat-input-bar.react.js",
"diff": "@@ -216,7 +216,7 @@ class ChatInputBar extends React.PureComponent<Props, State> {\n}\nsetIOSKeyboardHeight() {\n- if (Platform.OS !== 'ios' || this.systemKeyboardShowing) {\n+ if (Platform.OS !== 'ios') {\nreturn;\n}\nconst { textInput } = this;\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Set iOS gallery keyboard height regardless of system keyboard status |
129,187 | 13.07.2020 10:51:37 | 14,400 | 5758dfee1db5e78b084569531207d889465c8852 | [native] Patch Metro to fix ReactNav back-button.png resolving issue | [
{
"change_type": "MODIFY",
"old_path": "native/metro.config.js",
"new_path": "native/metro.config.js",
"diff": "@@ -6,6 +6,14 @@ module.exports = {\npath.resolve(__dirname, '../lib'),\n],\n+ server: {\n+ enhanceMiddleware: middleware => (req, res, next) => {\n+ // Fix Android dev mode asset resolution for yarn workspaces\n+ req.url = req.url.replace(/^\\/node_modules/, '/assets/../node_modules');\n+ return middleware(req, res, next);\n+ },\n+ },\n+\ntransformer: {\ngetTransformOptions: async () => ({\ntransform: {\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "patches/react-native+0.62.2.patch",
"diff": "+diff --git a/node_modules/react-native/Libraries/Image/AssetSourceResolver.js b/node_modules/react-native/Libraries/Image/AssetSourceResolver.js\n+index 624c622..bc67109 100644\n+--- a/node_modules/react-native/Libraries/Image/AssetSourceResolver.js\n++++ b/node_modules/react-native/Libraries/Image/AssetSourceResolver.js\n+@@ -114,7 +114,12 @@ class AssetSourceResolver {\n+ */\n+ scaledAssetURLNearBundle(): ResolvedAssetSource {\n+ const path = this.jsbundleUrl || 'file://';\n+- return this.fromSource(path + getScaledAssetPath(this.asset));\n++ return this.fromSource(\n++ // Assets can have relative paths outside of the project root.\n++ // When bundling them we replace `../` with `_` to make sure they\n++ // don't end up outside of the expected assets directory.\n++ path + getScaledAssetPath(this.asset).replace(/\\.\\.\\//g, '_'),\n++ );\n+ }\n+\n+ /**\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | [native] Patch Metro to fix ReactNav back-button.png resolving issue |
129,187 | 13.07.2020 13:26:20 | 14,400 | 987a489fdb56296165666219865140cb38c9cc7f | Clean up navInfo references from when it included navigationState | [
{
"change_type": "MODIFY",
"old_path": "lib/reducers/connection-reducer.js",
"new_path": "lib/reducers/connection-reducer.js",
"diff": "@@ -100,9 +100,7 @@ export default function reduceConnectionInfo(\nreturn {\n...action.payload.connection,\nstatus: 'connecting',\n- queuedActivityUpdates: action.payload.navInfo\n- ? action.payload.connection.queuedActivityUpdates\n- : [],\n+ queuedActivityUpdates: [],\nlateResponses: [],\nshowDisconnectedBar: false,\n};\n"
},
{
"change_type": "MODIFY",
"old_path": "lib/reducers/master-reducer.js",
"new_path": "lib/reducers/master-reducer.js",
"diff": "@@ -29,14 +29,6 @@ export default function baseReducer<N: BaseNavInfo, T: BaseAppState<N>>(\nconst threadStore = reduceThreadInfos(state.threadStore, action);\nconst { threadInfos } = threadStore;\n- // NavInfo has to be handled differently because of the covariance\n- // (see comment about \"+\" in redux-types.js)\n- const baseNavInfo = reduceBaseNavInfo(state.navInfo, action);\n- const navInfo =\n- baseNavInfo === state.navInfo\n- ? state.navInfo\n- : { ...state.navInfo, ...baseNavInfo };\n-\n// Only allow checkpoints to increase if we are connected\n// or if the action is a STATE_SYNC\nlet messageStore = reduceMessageStore(\n@@ -67,7 +59,7 @@ export default function baseReducer<N: BaseNavInfo, T: BaseAppState<N>>(\nreturn {\n...state,\n- navInfo,\n+ navInfo: reduceBaseNavInfo(state.navInfo, action),\nentryStore: reduceEntryInfos(state.entryStore, action, threadInfos),\nloadingStatuses: reduceLoadingStatuses(state.loadingStatuses, action),\ncurrentUserInfo: reduceCurrentUserInfo(state.currentUserInfo, action),\n"
},
{
"change_type": "MODIFY",
"old_path": "native/redux/persist.js",
"new_path": "native/redux/persist.js",
"diff": "@@ -19,16 +19,6 @@ import { inconsistencyResponsesToReports } from 'lib/shared/report-utils';\nimport { defaultNotifPermissionAlertInfo } from '../push/alerts';\n-const baseBlacklist = [\n- 'loadingStatuses',\n- 'foreground',\n- 'dimensions',\n- 'connectivity',\n- 'deviceOrientation',\n- 'frozen',\n-];\n-const blacklist = __DEV__ ? baseBlacklist : [...baseBlacklist, 'navInfo'];\n-\nconst migrations = {\n[1]: (state: AppState) => ({\n...state,\n@@ -171,7 +161,14 @@ const migrations = {\nconst persistConfig = {\nkey: 'root',\nstorage: AsyncStorage,\n- blacklist,\n+ blacklist: [\n+ 'loadingStatuses',\n+ 'foreground',\n+ 'dimensions',\n+ 'connectivity',\n+ 'deviceOrientation',\n+ 'frozen',\n+ ],\ndebug: __DEV__,\nversion: 16,\nmigrate: createMigrate(migrations, { debug: __DEV__ }),\n"
}
] | JavaScript | BSD 3-Clause New or Revised License | comme2e/comm | Clean up navInfo references from when it included navigationState |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.