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)
if (type.isEnter) {
binding.filterBottomSheet.filterBottomSheet.isVisible = true
presenter.getLibrary()
if (type == ControllerChangeType.POP_ENTER) {
presenter.getLibrary()
}
DownloadService.callListeners()
LibraryUpdateService.setListener(this)
binding.recyclerCover.isClickable = false

View File

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