debug: Debug index out of bound exception.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
aminecmi 2023-05-10 20:50:13 +02:00
parent 677ede5bc7
commit 66ef1ccf32

View File

@ -71,7 +71,12 @@ class ReaderActivity : AppCompatActivity(), DIAware {
finish()
}
readItem(allItems[currentItem])
try {
readItem(allItems[currentItem])
} catch (e: IndexOutOfBoundsException) {
e.sendSilentlyWithAcraWithName("out of bound > size = ${allItems.size} currentItem = $currentItem")
finish()
}
binding.pager.adapter = ScreenSlidePagerAdapter(this)
binding.pager.setCurrentItem(currentItem, false)