mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-24 01:31:50 +01:00
Using with for recycler in library
This commit is contained in:
parent
d45d3014f4
commit
d731027b2e
@ -784,23 +784,27 @@ class LibraryController(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setRecyclerLayout() {
|
private fun setRecyclerLayout() {
|
||||||
binding.libraryGridRecycler.recycler.post {
|
with(binding.libraryGridRecycler.recycler) {
|
||||||
binding.libraryGridRecycler.recycler.updatePaddingRelative(bottom = 50.dpToPx + (activityBinding?.bottomNav?.height ?: 0))
|
post {
|
||||||
|
updatePaddingRelative(
|
||||||
|
bottom = 50.dpToPx + (activityBinding?.bottomNav?.height ?: 0)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
if (libraryLayout == 0) {
|
if (libraryLayout == 0) {
|
||||||
binding.libraryGridRecycler.recycler.spanCount = 1
|
spanCount = 1
|
||||||
binding.libraryGridRecycler.recycler.updatePaddingRelative(
|
updatePaddingRelative(
|
||||||
start = 0,
|
start = 0,
|
||||||
end = 0
|
end = 0
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
binding.libraryGridRecycler.recycler.setGridSize(preferences)
|
setGridSize(preferences)
|
||||||
binding.libraryGridRecycler.recycler.updatePaddingRelative(
|
updatePaddingRelative(
|
||||||
start = 5.dpToPx,
|
start = 5.dpToPx,
|
||||||
end = 5.dpToPx
|
end = 5.dpToPx
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun setPreferenceFlows() {
|
private fun setPreferenceFlows() {
|
||||||
listOf(
|
listOf(
|
||||||
|
Loading…
Reference in New Issue
Block a user