Fixed the scenario where, if the application does not have the MANAGE_EXTERNAL_STORAGE permission and the user tries to open a ZIM file from the file manager, the app now prompts for the required permission instead of showing an error.

This commit is contained in:
MohitMaliFtechiz 2025-01-22 18:42:08 +05:30 committed by Kelson
parent daeec25ffd
commit 65d00fe616

View File

@ -437,7 +437,9 @@ class LocalLibraryFragment : BaseFragment(), CopyMoveFileHandler.FileCopyMoveCal
)
} else {
zimFileUri = uri
if (requestExternalStorageWritePermission()) {
if (!requireActivity().isManageExternalStoragePermissionGranted(sharedPreferenceUtil)) {
showManageExternalStoragePermissionDialog()
} else if (requestExternalStorageWritePermission()) {
getZimFileFromUri(uri)?.let(::navigateToReaderFragment)
}
}