Fixed missing tabs on chapters

This commit is contained in:
Jay 2020-02-17 00:31:39 -08:00
parent 517f24e5e9
commit 73ecfa389b
3 changed files with 3 additions and 12 deletions

View File

@ -358,8 +358,8 @@ class LibraryController(
override fun onChangeStarted(handler: ControllerChangeHandler, type: ControllerChangeType) { override fun onChangeStarted(handler: ControllerChangeHandler, type: ControllerChangeType) {
super.onChangeStarted(handler, type) super.onChangeStarted(handler, type)
if (type.isEnter) { if (type.isEnter) {
if (usePager) if (!usePager)
(activity as MainActivity).supportActionBar?.setDisplayShowCustomEnabled(true) (activity as MainActivity).supportActionBar?.setDisplayShowCustomEnabled(true)
//activity?.tabs?.setupWithViewPager(library_pager) //activity?.tabs?.setupWithViewPager(library_pager)
presenter.getLibrary() presenter.getLibrary()
DownloadService.addListener(this) DownloadService.addListener(this)
@ -919,7 +919,7 @@ class LibraryController(
toggleSelection(position) toggleSelection(position)
true true
} else { } else {
openManga(item.manga, 0f) openManga(item.manga, null)
false false
} }
} }

View File

@ -278,10 +278,6 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
}) })
if (router.backstackSize <= 1) {
tabAnimator.hide()
}
syncActivityViewWithController(router.backstack.lastOrNull()?.controller()) syncActivityViewWithController(router.backstack.lastOrNull()?.controller())
if (savedInstanceState == null) { if (savedInstanceState == null) {

View File

@ -97,11 +97,6 @@ class TabsAnimator(val tabs: TabLayout) {
isLastStateShown = false isLastStateShown = false
} }
fun hide() {
setHeight(0)
isLastStateShown = false
}
/** /**
* Returns whether the tab layout has a known height. * Returns whether the tab layout has a known height.
*/ */