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.MenuItem
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.core.view.get
|
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import androidx.core.view.updatePadding
|
import androidx.core.view.updatePadding
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
|
@ -203,7 +202,7 @@ open class BrowseSourceController(bundle: Bundle) :
|
||||||
numColumnsJob?.cancel()
|
numColumnsJob?.cancel()
|
||||||
|
|
||||||
var oldPosition = RecyclerView.NO_POSITION
|
var oldPosition = RecyclerView.NO_POSITION
|
||||||
val oldRecycler = binding.catalogueView[1]
|
val oldRecycler = binding.catalogueView.getChildAt(1)
|
||||||
if (oldRecycler is RecyclerView) {
|
if (oldRecycler is RecyclerView) {
|
||||||
oldPosition = (oldRecycler.layoutManager as LinearLayoutManager).findFirstVisibleItemPosition()
|
oldPosition = (oldRecycler.layoutManager as LinearLayoutManager).findFirstVisibleItemPosition()
|
||||||
oldRecycler.adapter = null
|
oldRecycler.adapter = null
|
||||||
|
|
|
@ -6,7 +6,6 @@ import android.util.AttributeSet
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.core.view.get
|
|
||||||
import eu.davidea.flexibleadapter.FlexibleAdapter
|
import eu.davidea.flexibleadapter.FlexibleAdapter
|
||||||
import eu.davidea.flexibleadapter.items.IFlexible
|
import eu.davidea.flexibleadapter.items.IFlexible
|
||||||
import eu.kanade.tachiyomi.databinding.SourceFilterSheetBinding
|
import eu.kanade.tachiyomi.databinding.SourceFilterSheetBinding
|
||||||
|
@ -56,7 +55,7 @@ class SourceFilterSheet(
|
||||||
init {
|
init {
|
||||||
recycler.adapter = adapter
|
recycler.adapter = adapter
|
||||||
recycler.setHasFixedSize(true)
|
recycler.setHasFixedSize(true)
|
||||||
(binding.root[1] as ViewGroup).addView(recycler)
|
(binding.root.getChildAt(1) as ViewGroup).addView(recycler)
|
||||||
addView(binding.root)
|
addView(binding.root)
|
||||||
binding.filterBtn.setOnClickListener { onFilterClicked() }
|
binding.filterBtn.setOnClickListener { onFilterClicked() }
|
||||||
binding.resetBtn.setOnClickListener { onResetClicked() }
|
binding.resetBtn.setOnClickListener { onResetClicked() }
|
||||||
|
|
|
@ -245,7 +245,6 @@ class MangaFullCoverDialog : FullComposeController<MangaFullCoverDialog.MangaFul
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -257,4 +256,3 @@ class MangaFullCoverDialog : FullComposeController<MangaFullCoverDialog.MangaFul
|
||||||
private const val REQUEST_IMAGE_OPEN = 101
|
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()
|
val title = getString(R.styleable.MaterialSpinnerView_title).orEmpty()
|
||||||
binding.title.text = title
|
binding.title.text = title
|
||||||
|
|
||||||
val viewEntries = (getTextArray(R.styleable.MaterialSpinnerView_android_entries)
|
val viewEntries = (
|
||||||
?: emptyArray()).map { it.toString() }
|
getTextArray(R.styleable.MaterialSpinnerView_android_entries)
|
||||||
|
?: emptyArray()
|
||||||
|
).map { it.toString() }
|
||||||
entries = viewEntries
|
entries = viewEntries
|
||||||
binding.details.text = viewEntries.firstOrNull().orEmpty()
|
binding.details.text = viewEntries.firstOrNull().orEmpty()
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue