committed by
GitHub Enterprise
parent
623b055aa1
commit
75a64a9187
4
App.tsx
4
App.tsx
@@ -17,6 +17,8 @@ import useNativeButtons from './src/hooks/useNativeButton';
|
||||
import { StatusBar } from 'react-native';
|
||||
import { COLORS } from './RN-UI-LIB/src/styles/colors';
|
||||
import codePush from 'react-native-code-push';
|
||||
// import { LogBox } from 'react-native';
|
||||
// LogBox.ignoreAllLogs();
|
||||
|
||||
Sentry.init({ dsn: SENTRY_DSN });
|
||||
|
||||
@@ -28,7 +30,7 @@ const App = () => {
|
||||
loading={<FullScreenLoader loading />}
|
||||
persistor={persistor}>
|
||||
<NavigationContainer ref={navigationRef}>
|
||||
<StatusBar backgroundColor={COLORS.BACKGROUND.HEADER_DARK} />
|
||||
<StatusBar backgroundColor={COLORS.BACKGROUND.INDIGO_DARK} />
|
||||
<ErrorBoundary>
|
||||
<ProtectedRouter />
|
||||
</ErrorBoundary>
|
||||
|
||||
Submodule RN-UI-LIB updated: 84420d3b06...e0252a39c0
@@ -29,7 +29,7 @@ const Banner: React.FC<IBanner> = ({
|
||||
<View>{children}</View>
|
||||
{hideClose ? null : (
|
||||
<TouchableOpacity onPress={toggleText} style={styles.closeIcon}>
|
||||
<CloseIconSmall fillColor={COLORS.BACKGROUND.HEADER_DARK} />
|
||||
<CloseIconSmall fillColor={COLORS.BACKGROUND.INDIGO_DARK} />
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
</View>
|
||||
|
||||
@@ -321,7 +321,7 @@ const styles = StyleSheet.create({
|
||||
iconContainer:{justifyContent:'center', height: 30, borderRadius: 15},
|
||||
header: {
|
||||
height: 78,
|
||||
backgroundColor: COLORS.BACKGROUND.HEADER,
|
||||
backgroundColor: COLORS.BACKGROUND.INDIGO,
|
||||
paddingVertical: 22,
|
||||
paddingHorizontal: 16,
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import { CaseDetail } from '../screens/caseDetails/interface';
|
||||
import { FirestoreUpdateTypes } from '../common/Constants';
|
||||
import { toast } from '../../RN-UI-LIB/src/components/toast';
|
||||
import auth from '@react-native-firebase/auth';
|
||||
import { updateTemplateData } from '../reducer/caseReducre';
|
||||
import { updateTemplateData } from '../reducer/caseReducer';
|
||||
|
||||
export interface CaseUpdates {
|
||||
updateType: string;
|
||||
|
||||
@@ -31,7 +31,7 @@ export default ProfileHeader;
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
header: {
|
||||
backgroundColor: COLORS.BACKGROUND.HEADER,
|
||||
backgroundColor: COLORS.BACKGROUND.INDIGO,
|
||||
height: 56,
|
||||
paddingLeft: 26,
|
||||
},
|
||||
|
||||
@@ -2,6 +2,8 @@ import React, { useEffect, useMemo } from 'react';
|
||||
import {
|
||||
Animated,
|
||||
Modal,
|
||||
NativeScrollEvent,
|
||||
NativeSyntheticEvent,
|
||||
RefreshControl,
|
||||
StyleSheet,
|
||||
View,
|
||||
@@ -29,7 +31,7 @@ import { useAppDispatch, useAppSelector } from '../../hooks';
|
||||
import NoCasesFound from './NoCasesFound';
|
||||
import useRefresh from '../../hooks/useRefresh';
|
||||
import { addClickstreamEvent } from '../../services/clickstreamEventService';
|
||||
import { CLICKSTREAM_EVENT_NAMES, HEADER_HEIGHT_MAX, HEADER_HEIGHT_MIN } from '../../common/Constants';
|
||||
import { CLICKSTREAM_EVENT_NAMES, HEADER_HEIGHT_MAX, HEADER_HEIGHT_MIN, HEADER_SCROLL_DISTANCE } from '../../common/Constants';
|
||||
import Filters from './Filters';
|
||||
|
||||
export const getItem = (item: Array<ICaseItem>, index: number) => item[index];
|
||||
@@ -192,18 +194,31 @@ const AllCases: React.FC<IAllCases> = ({ scrollAnimation, translateDistance, hea
|
||||
// scrollAnimation.setValue(0);
|
||||
// };
|
||||
|
||||
// const handleListScrollEnd = (
|
||||
// event: NativeSyntheticEvent<NativeScrollEvent>,
|
||||
// ) => {
|
||||
// const offsetY = event?.nativeEvent?.contentOffset?.y;
|
||||
// if (offsetY <= 60) {
|
||||
// if (offsetY <= 30) {
|
||||
// scrollAnimation.setValue(0);
|
||||
// } else {
|
||||
// scrollAnimation.setValue(60);
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
const handleListScrollEnd = (
|
||||
event: NativeSyntheticEvent<NativeScrollEvent>,
|
||||
) => {
|
||||
const offsetY = event?.nativeEvent?.contentOffset?.y;
|
||||
if (offsetY <= HEADER_SCROLL_DISTANCE) {
|
||||
if (offsetY <= HEADER_SCROLL_DISTANCE / 2) {
|
||||
Animated.spring(scrollAnimation,{
|
||||
toValue: 0,
|
||||
speed: 10,
|
||||
useNativeDriver: false
|
||||
}).start();
|
||||
} else {
|
||||
Animated.spring(scrollAnimation,{
|
||||
toValue: HEADER_SCROLL_DISTANCE,
|
||||
useNativeDriver: false
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
};
|
||||
const handleListScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => {
|
||||
const offsetY = event?.nativeEvent?.contentOffset?.y;
|
||||
// const currentOffsetY = scrollAnimation._value;
|
||||
if(!offsetY) return;
|
||||
scrollAnimation.setValue(offsetY);
|
||||
};
|
||||
|
||||
return (
|
||||
<View style={[GenericStyles.fill, styles.container]}>
|
||||
@@ -218,21 +233,11 @@ const AllCases: React.FC<IAllCases> = ({ scrollAnimation, translateDistance, hea
|
||||
) : null}
|
||||
<VirtualizedList
|
||||
data={compiledList}
|
||||
onScroll={Animated.event(
|
||||
[
|
||||
{
|
||||
nativeEvent: {
|
||||
contentOffset: { y: scrollAnimation },
|
||||
},
|
||||
},
|
||||
],
|
||||
{
|
||||
useNativeDriver: false,
|
||||
},
|
||||
)}
|
||||
onScroll={handleListScroll}
|
||||
scrollEventThrottle={16}
|
||||
// TODO: Need to handle spring animation
|
||||
// onScrollEndDrag={handleListScrollEnd}
|
||||
onScrollEndDrag={handleListScrollEnd}
|
||||
onMomentumScrollEnd={handleListScrollEnd}
|
||||
contentContainerStyle={[
|
||||
compiledList.length ? null : GenericStyles.fill,
|
||||
styles.list,
|
||||
|
||||
@@ -83,7 +83,7 @@ const styles = StyleSheet.create({
|
||||
marginLeft: 4,
|
||||
},
|
||||
header: {
|
||||
color: COLORS.TEXT.HEADER_DARK
|
||||
color: COLORS.TEXT.INDIGO_DARK
|
||||
},
|
||||
pendingText: {
|
||||
marginLeft: 'auto'
|
||||
|
||||
@@ -102,7 +102,7 @@ const styles = StyleSheet.create({
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
zIndex: 10,
|
||||
backgroundColor: COLORS.BACKGROUND.HEADER,
|
||||
backgroundColor: COLORS.BACKGROUND.INDIGO,
|
||||
},
|
||||
textInput: {
|
||||
flexBasis: '75%'
|
||||
|
||||
@@ -29,7 +29,7 @@ const LearnTodoBanner = () => {
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
text: {
|
||||
color: COLORS.BACKGROUND.HEADER_DARK,
|
||||
color: COLORS.BACKGROUND.INDIGO_DARK,
|
||||
},
|
||||
actionText: {
|
||||
color: COLORS.TEXT.BLUE,
|
||||
|
||||
@@ -123,7 +123,7 @@ const AllCasesMain = () => {
|
||||
<View
|
||||
style={[
|
||||
GenericStyles.fill,
|
||||
{ backgroundColor: COLORS.BACKGROUND.HEADER },
|
||||
{ backgroundColor: COLORS.BACKGROUND.INDIGO },
|
||||
]}>
|
||||
<Tabs
|
||||
selectedTab="first"
|
||||
@@ -175,7 +175,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
headerTop: {
|
||||
height: 64,
|
||||
backgroundColor: COLORS.BACKGROUND.HEADER,
|
||||
backgroundColor: COLORS.BACKGROUND.INDIGO,
|
||||
},
|
||||
selectedText: {
|
||||
marginLeft: 18,
|
||||
@@ -183,7 +183,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
tabBarStyle: {
|
||||
marginVertical: 8,
|
||||
backgroundColor: COLORS.BACKGROUND.HEADER,
|
||||
backgroundColor: COLORS.BACKGROUND.INDIGO,
|
||||
},
|
||||
optionBar: {
|
||||
position: 'absolute',
|
||||
@@ -200,7 +200,7 @@ const styles = StyleSheet.create({
|
||||
color: COLORS.BACKGROUND.SECONDARY,
|
||||
},
|
||||
headerMenu: {
|
||||
backgroundColor: COLORS.BACKGROUND.HEADER
|
||||
backgroundColor: COLORS.BACKGROUND.INDIGO
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ export default CaseDetailsHeader;
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
header: {
|
||||
backgroundColor: COLORS.BACKGROUND.HEADER,
|
||||
backgroundColor: COLORS.BACKGROUND.INDIGO,
|
||||
height: 56,
|
||||
},
|
||||
headerLabel: {
|
||||
|
||||
@@ -178,7 +178,7 @@ const UserDetailsSection: React.FC<IUserDetailsSection> = props => {
|
||||
<SafeAreaView
|
||||
style={[
|
||||
GenericStyles.fill,
|
||||
{ backgroundColor: COLORS.BACKGROUND.HEADER },
|
||||
{ backgroundColor: COLORS.BACKGROUND.INDIGO },
|
||||
]}>
|
||||
<View style={GenericStyles.p16}>
|
||||
<TouchableOpacity onPress={handleOpenClose}>
|
||||
@@ -211,7 +211,7 @@ const styles = StyleSheet.create({
|
||||
height: 500,
|
||||
},
|
||||
backgroundColor: {
|
||||
backgroundColor: COLORS.BACKGROUND.HEADER,
|
||||
backgroundColor: COLORS.BACKGROUND.INDIGO,
|
||||
},
|
||||
unsyncedIcon: {
|
||||
position: 'absolute',
|
||||
@@ -224,7 +224,7 @@ const styles = StyleSheet.create({
|
||||
borderRadius: 6,
|
||||
},
|
||||
contentContainer: {
|
||||
backgroundColor: COLORS.BACKGROUND.HEADER,
|
||||
backgroundColor: COLORS.BACKGROUND.INDIGO,
|
||||
paddingBottom: 60,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -19,7 +19,7 @@ const Offline = () => {
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container:{
|
||||
backgroundColor: COLORS.BACKGROUND.HEADER
|
||||
backgroundColor: COLORS.BACKGROUND.INDIGO
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ const TodoList = () => {
|
||||
<Banner hideClose style={GenericStyles.m12}>
|
||||
<View style={[GenericStyles.row]}>
|
||||
<View style={styles.infoIcon}>
|
||||
<InfoIcon color={COLORS.BACKGROUND.HEADER_DARK} />
|
||||
<InfoIcon color={COLORS.BACKGROUND.INDIGO_DARK} />
|
||||
</View>
|
||||
<View style={{flexBasis: '95%'}}>
|
||||
<Heading dark type="h5" style={styles.headingText}>
|
||||
@@ -186,7 +186,7 @@ const styles = StyleSheet.create({
|
||||
borderTopWidth: 1,
|
||||
},
|
||||
headingText: {
|
||||
color: COLORS.BACKGROUND.HEADER_DARK,
|
||||
color: COLORS.BACKGROUND.INDIGO_DARK,
|
||||
},
|
||||
infoIcon: {
|
||||
flexBasis: '8%',
|
||||
|
||||
Reference in New Issue
Block a user