Fix old issues

This commit is contained in:
h4h13 2020-04-15 14:19:28 +05:30
parent c6fc672cd1
commit 893f7fafdd
7 changed files with 23 additions and 14 deletions

View file

@ -30,6 +30,7 @@ class SongsFragment :
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
App.musicComponent.inject(this)
retainInstance = true
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
@ -38,7 +39,6 @@ class SongsFragment :
}
override fun createLayoutManager(): GridLayoutManager {
println("createLayoutManager: ${getGridSize()}")
return GridLayoutManager(requireActivity(), getGridSize()).apply {
spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() {
override fun getSpanSize(position: Int): Int {