TP-37153 | Merge branch 'master' of github.com:navi-medici/address-verification-app into feat/TP-37153-notification-permission
This commit is contained in:
@@ -131,8 +131,8 @@ def reactNativeArchitectures() {
|
||||
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
|
||||
}
|
||||
|
||||
def VERSION_CODE = 77
|
||||
def VERSION_NAME = "2.3.4"
|
||||
def VERSION_CODE = 79
|
||||
def VERSION_NAME = "2.3.6"
|
||||
|
||||
android {
|
||||
ndkVersion rootProject.ext.ndkVersion
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "AV_APP",
|
||||
"version": "2.3.4",
|
||||
"version": "2.3.6",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"android:dev": "yarn move:dev && react-native run-android",
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
||||
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import {
|
||||
Animated,
|
||||
ListRenderItem,
|
||||
ListRenderItemInfo,
|
||||
Modal,
|
||||
NativeScrollEvent,
|
||||
NativeSyntheticEvent,
|
||||
StyleSheet,
|
||||
Text,
|
||||
View,
|
||||
} from 'react-native';
|
||||
import { GenericStyles, SCREEN_HEIGHT, SCREEN_WIDTH } from '../../../RN-UI-LIB/src/styles';
|
||||
@@ -34,7 +32,7 @@ import {
|
||||
VISIT_PLAN_HEADER_HEIGHT_MIN,
|
||||
VISIT_PLAN_HEADER_HEIGHT_MIN_WITH_QUICK_FILTERS,
|
||||
} from '../../common/Constants';
|
||||
import { CaseDetail, FeedbackStatus } from '../caseDetails/interface';
|
||||
import { CaseDetail } from '../caseDetails/interface';
|
||||
import CaseListHeader from './CaseListHeader';
|
||||
import { evaluateFilterForCases } from '../../components/screens/allCases/allCasesFilters/FilterUtils';
|
||||
import { debounce } from '../../components/utlis/commonFunctions';
|
||||
@@ -44,6 +42,7 @@ import { FlashList } from '@shopify/flash-list';
|
||||
import { VisitPlanStatus } from '../../reducer/userSlice';
|
||||
import { dateFormat, DAY_MONTH_DATE_FORMAT } from '../../../RN-UI-LIB/src/utlis/dates';
|
||||
import { getAttemptedList, getNonAttemptedList } from './utils';
|
||||
import { GenericType } from '../../common/GenericTypes';
|
||||
|
||||
export const getItem = (item: Array<ICaseItem>, index: number) => item[index];
|
||||
export const ESTIMATED_ITEM_SIZE = 250; // Average height of List item
|
||||
@@ -75,6 +74,7 @@ const CasesList: React.FC<ICasesList> = ({ casesList = [], isVisitPlan }) => {
|
||||
}));
|
||||
|
||||
const [showFilterModal, setShowFilterModal] = React.useState<boolean>(false);
|
||||
const flashListRef = useRef<GenericType>(null);
|
||||
|
||||
const scrollAnimation = useRef(new Animated.Value(0)).current;
|
||||
|
||||
@@ -184,6 +184,19 @@ const CasesList: React.FC<ICasesList> = ({ casesList = [], isVisitPlan }) => {
|
||||
return { filteredCasesList: filteredListAfterQuery, listEmptyComponent };
|
||||
}, [casesList, caseDetails, filters, selectedFilters, searchQuery, isLockedVisitPlanStatus]);
|
||||
|
||||
useEffect(() => {
|
||||
if (flashListRef?.current) {
|
||||
// @ts-expect-error
|
||||
const currentScrollOffset = scrollAnimation?._value;
|
||||
if (!currentScrollOffset) {
|
||||
return;
|
||||
}
|
||||
if (currentScrollOffset > 0) {
|
||||
flashListRef?.current?.scrollToOffset({ animated: false, offset: 0 });
|
||||
}
|
||||
}
|
||||
}, [searchQuery]);
|
||||
|
||||
const filteredCasesListWithCTA = useMemo(() => {
|
||||
if (!isVisitPlan) {
|
||||
return [...filteredCasesList];
|
||||
@@ -308,6 +321,7 @@ const CasesList: React.FC<ICasesList> = ({ casesList = [], isVisitPlan }) => {
|
||||
<View style={GenericStyles.fill}>
|
||||
{filteredCasesListWithCTA.length ? (
|
||||
<FlashList
|
||||
ref={flashListRef}
|
||||
data={filteredCasesListWithCTA}
|
||||
scrollEventThrottle={16}
|
||||
contentContainerStyle={listStyle}
|
||||
|
||||
Reference in New Issue
Block a user