From 83f7f75c56463c8bc40c3975e3d5eb29a92f9e25 Mon Sep 17 00:00:00 2001 From: Aswin S Date: Tue, 21 Dec 2021 00:47:52 +0530 Subject: [PATCH] fix: show permission error only when permission is denied or missing --- src/libs/fileDownload/index.native.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/fileDownload/index.native.js b/src/libs/fileDownload/index.native.js index bf474351a72..31690b7bec3 100644 --- a/src/libs/fileDownload/index.native.js +++ b/src/libs/fileDownload/index.native.js @@ -138,9 +138,9 @@ export default function fileDownload(url, fileName) { hasAndroidPermission().then((hasPermission) => { if (hasPermission) { handleDownload(url, fileName).then(() => resolve()); + } else { + showAlert(permissionError); } - - showAlert(permissionError); return resolve(); }).catch(() => { showAlert(permissionError);