diff --git a/package.json b/package.json index 3b4828fa..625f310f 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "prepare": "husky install" }, "dependencies": { + "@bam.tech/react-native-image-resizer": "3.0.5", "@cobo/apm-rum-react-native": "^0.6.0", "@elastic/apm-rum-core": "^5.17.0", "@nozbe/watermelondb": "0.24.0", @@ -51,7 +52,6 @@ "dayjs": "1.11.9", "fuzzysort": "2.0.4", "lottie-react-native": "5.1.4", - "md5": "2.3.0", "react": "18.1.0", "react-hook-form": "7.40.0", "react-native": "0.70.6", @@ -89,7 +89,6 @@ "@babel/runtime": "7.12.5", "@tsconfig/react-native": "2.0.2", "@types/jest": "26.0.23", - "@types/md5": "2.3.2", "@types/react": "18.0.21", "@types/react-native": "0.70.6", "@types/react-native-fetch-blob": "0.10.7", diff --git a/src/action/dataActions.ts b/src/action/dataActions.ts index 7d439597..46574b08 100644 --- a/src/action/dataActions.ts +++ b/src/action/dataActions.ts @@ -27,7 +27,7 @@ import { GenericFunctionArgs } from '../common/GenericTypes'; let _signedApiCallBucket: { req: any; added_At: number; callback: GenericFunctionArgs }[] = []; let _signedApiCallBucketTimer: number = 0; const SIGNED_API_BUCKET_SIZE = 10; -const SIGNED_API_BUCKET_TIMEOUT = 1000; +const SIGNED_API_BUCKET_TIMEOUT = 5 * 1000; const SUBMIT_FEEDBACK_API_VERSION = 3; export const postPinnedList = diff --git a/src/common/TrackingComponent.tsx b/src/common/TrackingComponent.tsx index 50c0df5c..231d52f3 100644 --- a/src/common/TrackingComponent.tsx +++ b/src/common/TrackingComponent.tsx @@ -247,7 +247,7 @@ const TrackingComponent: React.FC = ({ children }) => { { taskId: FOREGROUND_TASKS.DELETE_CACHE, task: deleteCache, - delay: 1000, + delay: DATA_SYNC_TIME_INTERVAL, onLoop: true, }, ]; @@ -305,8 +305,8 @@ const TrackingComponent: React.FC = ({ children }) => { CosmosForegroundService.isRunning().then((isFGSRunning) => { if (!isFGSRunning) { appStateSubscription = AppState.addEventListener('change', handleAppStateChange); + CosmosForegroundService.start(tasks); } - CosmosForegroundService.start(tasks); }); return () => { appStateSubscription?.remove(); diff --git a/src/screens/allCases/CaseItemAvatar.tsx b/src/screens/allCases/CaseItemAvatar.tsx index 0a7912a8..c5e57650 100644 --- a/src/screens/allCases/CaseItemAvatar.tsx +++ b/src/screens/allCases/CaseItemAvatar.tsx @@ -19,6 +19,7 @@ import { useIsFocused } from '@react-navigation/native'; import RNFastImage from '../../../RN-UI-LIB/src/components/FastImage'; import FastImage from 'react-native-fast-image'; import Text from '../../../RN-UI-LIB/src/components/Text'; +import { GenericStyles } from '../../../RN-UI-LIB/src/styles'; interface ICaseItemAvatar { caseDetailObj: ICaseItemAvatarCaseDetailObj; @@ -136,7 +137,7 @@ const CaseItemAvatar: React.FC = ({ onErrorFallback={onError} onSuccess={onSuccess} style={[showBorder && styles.border]} - containerStyle={{ zIndex: 1 }} + containerStyle={styles.zi1} // loading={loading} /> {GlobalImageMap[cacheFilePath] && ( @@ -146,7 +147,7 @@ const CaseItemAvatar: React.FC = ({ dataURI={GlobalImageMap[cacheFilePath]} onErrorFallback={onErrorFallback} onSuccess={onSuccessHighRes} - containerStyle={{ position: 'absolute', zIndex: shouldShowHighRes ? 10 : 0 }} + containerStyle={[GenericStyles.absolute, { zIndex: shouldShowHighRes ? 10 : 0 }]} loading={false} /> )} @@ -171,6 +172,9 @@ const styles = StyleSheet.create({ borderColor: COLORS.BACKGROUND.SECONDARY, borderWidth: 2, }, + zi1: { + zIndex: 1, + }, }); export default memo(CaseItemAvatar); diff --git a/src/screens/caseDetails/CustomerProfile.tsx b/src/screens/caseDetails/CustomerProfile.tsx index 867a1eac..1673cc27 100644 --- a/src/screens/caseDetails/CustomerProfile.tsx +++ b/src/screens/caseDetails/CustomerProfile.tsx @@ -195,39 +195,20 @@ const CustomerProfile: React.FC = (props) => { retry={retry} /> {loading ? ( - + {!isNullOrEmptyString(imageUri) ? '' : 'No Image Found'} ) : null} {(errorModalImage && errorCount > 3) || imageUri.length == 0 ? ( <> - + Image could not load! Please retry - +