Skip to content

Commit

Permalink
Opening ZIM file via its file path instead of fileDescriptor if the u…
Browse files Browse the repository at this point in the history
…ser opens te ZIM file via deep linking.
  • Loading branch information
MohitMaliDeveloper committed Mar 1, 2024
1 parent b1d6aa8 commit da051e0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ class KiwixReaderFragment : CoreReaderFragment() {
when (it.scheme) {
"file" -> openZimFile(ZimReaderSource(it.toFile()))

Check warning on line 299 in app/src/main/java/org/kiwix/kiwixmobile/nav/destination/reader/KiwixReaderFragment.kt

View check run for this annotation

Codecov / codecov/patch

app/src/main/java/org/kiwix/kiwixmobile/nav/destination/reader/KiwixReaderFragment.kt#L299

Added line #L299 was not covered by tests
"content" -> {
val zimReaderSource = ZimReaderSource(it)
val zimReaderSource = ZimReaderSource(getZimFileFromUri(it))

Check warning on line 301 in app/src/main/java/org/kiwix/kiwixmobile/nav/destination/reader/KiwixReaderFragment.kt

View check run for this annotation

Codecov / codecov/patch

app/src/main/java/org/kiwix/kiwixmobile/nav/destination/reader/KiwixReaderFragment.kt#L301

Added line #L301 was not covered by tests
if (zimReaderSource.canOpenInLibkiwix()) {
zimReaderContainer?.let { zimReaderContainer ->
zimReaderContainer.setZimReaderSource(zimReaderSource)

Check warning on line 304 in app/src/main/java/org/kiwix/kiwixmobile/nav/destination/reader/KiwixReaderFragment.kt

View check run for this annotation

Codecov / codecov/patch

app/src/main/java/org/kiwix/kiwixmobile/nav/destination/reader/KiwixReaderFragment.kt#L304

Added line #L304 was not covered by tests
Expand Down

0 comments on commit da051e0

Please sign in to comment.