Skip to content

Commit

Permalink
Enhanced zim file loading functionality.
Browse files Browse the repository at this point in the history
* We have corrected the order of obtaining ZIM files, specifically for the DWDS application. In this application, we retrieve the ZIM file from the asset folder, and there is no ZIM file inside the obb/files directory. This adjustment addresses an issue where a temporary file was mistakenly added to the files directory, causing the application to return an invalid file. By changing this order, it does not impact previous apps, as they do not have the ZIM file in the asset folder, allowing them to skip this part and function normally.
  • Loading branch information
MohitMaliDeveloper committed Oct 20, 2023
1 parent 69ce81c commit 724f4a7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ class CustomFileValidator @Inject constructor(private val context: Context) {
assetFile: File? = getFileFromPlayAssetDelivery()
): ValidationState {
return when {
assetFile != null -> HasFile(assetFile)
obbFiles.isNotEmpty() && zimFiles().isNotEmpty() -> HasBothFiles(obbFiles[0], zimFiles[0])
obbFiles.isNotEmpty() -> HasFile(obbFiles[0])
zimFiles.isNotEmpty() -> HasFile(zimFiles[0])
assetFile != null -> HasFile(assetFile)
else -> HasNothing
}
}
Expand Down

0 comments on commit 724f4a7

Please sign in to comment.