Presenter is now responsible for the first getLIbrary call

This commit is contained in:
Jays2Kings 2021-04-28 04:00:16 -04:00
parent 1c30445e68
commit 28f222a5e6
2 changed files with 5 additions and 3 deletions

View File

@ -840,7 +840,9 @@ class LibraryController(
super.onChangeStarted(handler, type) super.onChangeStarted(handler, type)
if (type.isEnter) { if (type.isEnter) {
binding.filterBottomSheet.filterBottomSheet.isVisible = true binding.filterBottomSheet.filterBottomSheet.isVisible = true
if (type == ControllerChangeType.POP_ENTER) {
presenter.getLibrary() presenter.getLibrary()
}
DownloadService.callListeners() DownloadService.callListeners()
LibraryUpdateService.setListener(this) LibraryUpdateService.setListener(this)
binding.recyclerCover.isClickable = false binding.recyclerCover.isClickable = false

View File

@ -93,8 +93,8 @@ class LibraryPresenter(
override fun onCreate() { override fun onCreate() {
super.onCreate() super.onCreate()
libraryItems = lastLibraryItems ?: return lastLibraryItems?.let { libraryItems = it }
categories = lastCategories ?: return lastCategories?.let { categories = it }
lastCategories = null lastCategories = null
lastLibraryItems = null lastLibraryItems = null
getLibrary() getLibrary()