Fix crashes from KTX extension changes
This commit is contained in:
parent
e3b1053c03
commit
915e38f636
4 changed files with 7 additions and 9 deletions
|
@ -8,7 +8,6 @@ import android.view.MenuInflater
|
|||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.view.get
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.core.view.updatePadding
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
|
@ -203,7 +202,7 @@ open class BrowseSourceController(bundle: Bundle) :
|
|||
numColumnsJob?.cancel()
|
||||
|
||||
var oldPosition = RecyclerView.NO_POSITION
|
||||
val oldRecycler = binding.catalogueView[1]
|
||||
val oldRecycler = binding.catalogueView.getChildAt(1)
|
||||
if (oldRecycler is RecyclerView) {
|
||||
oldPosition = (oldRecycler.layoutManager as LinearLayoutManager).findFirstVisibleItemPosition()
|
||||
oldRecycler.adapter = null
|
||||
|
|
|
@ -6,7 +6,6 @@ import android.util.AttributeSet
|
|||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.view.get
|
||||
import eu.davidea.flexibleadapter.FlexibleAdapter
|
||||
import eu.davidea.flexibleadapter.items.IFlexible
|
||||
import eu.kanade.tachiyomi.databinding.SourceFilterSheetBinding
|
||||
|
@ -56,7 +55,7 @@ class SourceFilterSheet(
|
|||
init {
|
||||
recycler.adapter = adapter
|
||||
recycler.setHasFixedSize(true)
|
||||
(binding.root[1] as ViewGroup).addView(recycler)
|
||||
(binding.root.getChildAt(1) as ViewGroup).addView(recycler)
|
||||
addView(binding.root)
|
||||
binding.filterBtn.setOnClickListener { onFilterClicked() }
|
||||
binding.resetBtn.setOnClickListener { onResetClicked() }
|
||||
|
|
|
@ -245,9 +245,8 @@ class MangaFullCoverDialog : FullComposeController<MangaFullCoverDialog.MangaFul
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
companion object {
|
||||
private const val MANGA_EXTRA = "mangaId"
|
||||
|
||||
|
@ -257,4 +256,3 @@ class MangaFullCoverDialog : FullComposeController<MangaFullCoverDialog.MangaFul
|
|||
private const val REQUEST_IMAGE_OPEN = 101
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,8 +56,10 @@ class MaterialSpinnerView @JvmOverloads constructor(context: Context, attrs: Att
|
|||
val title = getString(R.styleable.MaterialSpinnerView_title).orEmpty()
|
||||
binding.title.text = title
|
||||
|
||||
val viewEntries = (getTextArray(R.styleable.MaterialSpinnerView_android_entries)
|
||||
?: emptyArray()).map { it.toString() }
|
||||
val viewEntries = (
|
||||
getTextArray(R.styleable.MaterialSpinnerView_android_entries)
|
||||
?: emptyArray()
|
||||
).map { it.toString() }
|
||||
entries = viewEntries
|
||||
binding.details.text = viewEntries.firstOrNull().orEmpty()
|
||||
}
|
||||
|
|
Reference in a new issue