Increase offscreenPageLimit when recycle bin is used

This commit is contained in:
Ensar Sarajčić 2023-07-27 10:46:06 +02:00
parent ce855965b9
commit 68166c318c

View file

@ -187,6 +187,11 @@ class MainActivity : SimpleActivity() {
)
view_pager.adapter = ViewPagerAdapter(this, config.useRecycleBin)
view_pager.offscreenPageLimit = if (config.useRecycleBin) {
2
} else {
1
}
view_pager.onPageChangeListener {
main_tabs_holder.getTabAt(it)?.select()
(view_pager.adapter as ViewPagerAdapter).finishActMode()