diff --git a/package.json b/package.json
index 588e2b27..3a54a488 100644
--- a/package.json
+++ b/package.json
@@ -32,7 +32,8 @@
"move:qa": "cp -f ./config/qa/config.js ./src/constants && cp -f ./config/qa/google-services.json ./android/app",
"move:prod": "cp -f ./config/prod/config.js ./src/constants && cp -f ./config/prod/google-services.json ./android/app",
"debug": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res",
- "prepare": "husky install"
+ "prepare": "husky install",
+ "postinstall": "patch-package"
},
"dependencies": {
"@bam.tech/react-native-image-resizer": "3.0.5",
@@ -71,6 +72,8 @@
"fuzzysort": "2.0.4",
"lodash.chunk": "^4.2.0",
"lottie-react-native": "5.1.4",
+ "patch-package": "8.0.0",
+ "postinstall-postinstall": "2.1.0",
"react": "18.1.0",
"react-hook-form": "7.40.0",
"react-native": "0.70.6",
diff --git a/patches/react-native-pdf-renderer+1.1.1.patch b/patches/react-native-pdf-renderer+1.1.1.patch
new file mode 100644
index 00000000..918b0868
--- /dev/null
+++ b/patches/react-native-pdf-renderer+1.1.1.patch
@@ -0,0 +1,60 @@
+diff --git a/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/PdfRendererPackage.class b/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/PdfRendererPackage.class
+new file mode 100644
+index 0000000..f88561e
+Binary files /dev/null and b/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/PdfRendererPackage.class differ
+diff --git a/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView$GestureListener.class b/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView$GestureListener.class
+new file mode 100644
+index 0000000..7785af4
+Binary files /dev/null and b/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView$GestureListener.class differ
+diff --git a/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView$LayoutManager.class b/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView$LayoutManager.class
+new file mode 100644
+index 0000000..09de6ee
+Binary files /dev/null and b/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView$LayoutManager.class differ
+diff --git a/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView$PdfRendererAdapter$ViewHolder.class b/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView$PdfRendererAdapter$ViewHolder.class
+new file mode 100644
+index 0000000..4f4f188
+Binary files /dev/null and b/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView$PdfRendererAdapter$ViewHolder.class differ
+diff --git a/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView$PdfRendererAdapter.class b/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView$PdfRendererAdapter.class
+new file mode 100644
+index 0000000..8007871
+Binary files /dev/null and b/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView$PdfRendererAdapter.class differ
+diff --git a/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView$ScaleListener.class b/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView$ScaleListener.class
+new file mode 100644
+index 0000000..3caeb64
+Binary files /dev/null and b/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView$ScaleListener.class differ
+diff --git a/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView$ScrollListener.class b/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView$ScrollListener.class
+new file mode 100644
+index 0000000..f5a5824
+Binary files /dev/null and b/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView$ScrollListener.class differ
+diff --git a/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView.class b/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView.class
+new file mode 100644
+index 0000000..526b794
+Binary files /dev/null and b/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView.class differ
+diff --git a/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererViewManager.class b/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererViewManager.class
+new file mode 100644
+index 0000000..e4adac6
+Binary files /dev/null and b/node_modules/react-native-pdf-renderer/android/bin/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererViewManager.class differ
+diff --git a/node_modules/react-native-pdf-renderer/android/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView.java b/node_modules/react-native-pdf-renderer/android/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView.java
+index f0124e1..824763f 100644
+--- a/node_modules/react-native-pdf-renderer/android/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView.java
++++ b/node_modules/react-native-pdf-renderer/android/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView.java
+@@ -296,8 +296,8 @@ public class PdfRendererRecyclerView extends RecyclerView {
+
+ float currentZoom = values[Matrix.MSCALE_X];
+ float newZoom = currentZoom > mMinZoom ? mMinZoom : mMaxZoom;
+- float centerX = getWidth() / 2f;
+- float centerY = getHeight() / 2f;
++ float centerX = getWidth() / 3f;
++ float centerY = getHeight() / 3f;
+
+ mMatrix.setScale(newZoom, newZoom, centerX, centerY);
+ mMatrix.postTranslate(centerX - e.getX(), centerY - e.getY());
+@@ -345,7 +345,7 @@ public class PdfRendererRecyclerView extends RecyclerView {
+ if (mPdfRenderer == null) return;
+
+ PdfRenderer.Page page = mPdfRenderer.openPage(position);
+- Bitmap bitmap = Bitmap.createBitmap(page.getWidth(), page.getHeight(), Bitmap.Config.ARGB_4444);
++ Bitmap bitmap = Bitmap.createBitmap(page.getWidth()*4, page.getHeight()*4, Bitmap.Config.ARGB_8888);
+ page.render(bitmap, null, null, PdfRenderer.Page.RENDER_MODE_FOR_DISPLAY);
+
+ ImageView imageView = holder.getImageView();
diff --git a/src/screens/auth/ProtectedRouter.tsx b/src/screens/auth/ProtectedRouter.tsx
index 162c2a7d..2e7f6763 100644
--- a/src/screens/auth/ProtectedRouter.tsx
+++ b/src/screens/auth/ProtectedRouter.tsx
@@ -43,6 +43,7 @@ export const DEFAULT_SCREEN_OPTIONS: NativeStackNavigationOptions = {
animation: 'none',
animationDuration: SCREEN_ANIMATION_DURATION,
freezeOnBlur: true,
+ orientation: 'portrait',
};
const ProtectedRouter = () => {
diff --git a/src/screens/caseDetails/CaseDetailStack.tsx b/src/screens/caseDetails/CaseDetailStack.tsx
index dc6fd012..93cd711b 100644
--- a/src/screens/caseDetails/CaseDetailStack.tsx
+++ b/src/screens/caseDetails/CaseDetailStack.tsx
@@ -69,7 +69,11 @@ const CaseDetailStack = () => {
/>
-
+
diff --git a/src/screens/caseDetails/DocumentDataItem.tsx b/src/screens/caseDetails/DocumentDataItem.tsx
index eb6d43b4..de8a8749 100644
--- a/src/screens/caseDetails/DocumentDataItem.tsx
+++ b/src/screens/caseDetails/DocumentDataItem.tsx
@@ -14,7 +14,8 @@ import { useAppSelector } from '@hooks';
import { navigateToScreen } from '@components/utlis/navigationUtlis';
import LegalDocumentItem from './LegalDocumentItem';
import Text from '@rn-ui-lib/components/Text';
-import { shareableAndDownloadableDoctypesMap } from './constants';
+import { shareableAndDownloadableDoctypesMap, viewableDocTypesMap } from './constants';
+
interface IDocumentDataItem {
document: DocumentDetail;
@@ -43,8 +44,10 @@ const DocumentDataItem: React.FC = ({
const isPDF = docContentType === DocumentContentType.PDF;
const isVideo = docContentType === DocumentContentType.VIDEO;
const isShareableAndDownloadableDoc = !!shareableAndDownloadableDoctypesMap.get(docType);
+ const isViewableDoc = !!viewableDocTypesMap.get(docType);
const handleOpenPdfPress = () => {
+ if (!isViewableDoc) return;
navigateToScreen('pdfFull', {
pdfUri: url,
referenceId: documentRefId,
@@ -52,7 +55,7 @@ const DocumentDataItem: React.FC = ({
unSignedUri: unSignedUri,
caseId,
caseType,
- screenName: 'Aadhar PDF viewer',
+ screenName: `${document?.title} PDF viewer`,
});
};
@@ -73,19 +76,21 @@ const DocumentDataItem: React.FC = ({
]}
key={documentRefId}
>
-
{document?.icon}
{document?.title}
-
+
+
{!isShareableAndDownloadableDoc ? (
Open PDF
@@ -99,12 +104,7 @@ const DocumentDataItem: React.FC = ({
return (
= (props) => {
const [error, setError] = useState(false);
const [pdfUrl, setPdfUrl] = useState(pdfUri);
const [isValidating, setIsValidating] = useState(false);
+ const { width } = useWindowDimensions();
useS3UrlCheck(pdfUri, referenceId, caseId, caseType, unSignedUri, setPdfUrl, setIsValidating);
@@ -84,7 +85,8 @@ const PDFFullScreen: React.FC = (props) => {
{pdfFilePath && (