mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-08 14:52:13 -04:00
Fixed crash on first launch
This commit is contained in:
parent
01fdcbc70c
commit
cbe93fbf8f
@ -66,7 +66,7 @@ class CustomReaderFragment : CoreReaderFragment() {
|
||||
|
||||
@Inject lateinit var customFileValidator: CustomFileValidator
|
||||
@Inject lateinit var dialogShower: DialogShower
|
||||
|
||||
private var navFromReaderToDownload: Boolean = true
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
if (enforcedLanguage()) {
|
||||
@ -157,7 +157,10 @@ class CustomReaderFragment : CoreReaderFragment() {
|
||||
) {
|
||||
requestPermissions(arrayOf(READ_EXTERNAL_STORAGE), REQUEST_READ_FOR_OBB)
|
||||
} else {
|
||||
findNavController().navigate(actionCustomReaderToCustomDownload())
|
||||
if (navFromReaderToDownload) {
|
||||
findNavController().navigate(actionCustomReaderToCustomDownload())
|
||||
navFromReaderToDownload = false
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user