fix: Splash state assignment only happened on empty library

Hopefully fixed long splash time (GH-147, GH-26)
This commit is contained in:
Ahmad Ansori Palembani 2024-08-12 10:27:30 +07:00
parent a8e8fe01b7
commit 1720472f33
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6

View file

@ -1138,7 +1138,6 @@ open class LibraryController(
emptyList() emptyList()
}, },
) )
(activity as? MainActivity)?.splashState?.ready = true
} }
adapter.setItems(mangaMap) adapter.setItems(mangaMap)
if (binding.libraryGridRecycler.recycler.translationX != 0f) { if (binding.libraryGridRecycler.recycler.translationX != 0f) {
@ -1151,7 +1150,10 @@ open class LibraryController(
} }
} }
singleCategory = presenter.categories.size <= 1 singleCategory = presenter.categories.size <= 1
binding.progress.isVisible = false binding.progress.isVisible = false
(activity as? MainActivity)?.splashState?.ready = true
if (!freshStart) { if (!freshStart) {
justStarted = false justStarted = false
} // else binding.recyclerLayout.alpha = 1f } // else binding.recyclerLayout.alpha = 1f