From b4490e209ba74e657c192dddc983b17e8bc3217a Mon Sep 17 00:00:00 2001 From: Andreas Date: Sat, 16 Oct 2021 04:08:37 +0200 Subject: [PATCH] Fix inset not applying when in landscape (#6104) Reverts inset change from #5997, was changed due to it not changing the padding when using setPadding --- .../tachiyomi/ui/library/LibraryCategoryView.kt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryView.kt index 76070c0bc..3f1a72ad2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryView.kt @@ -5,8 +5,7 @@ import android.util.AttributeSet import android.view.View import android.widget.FrameLayout import androidx.recyclerview.widget.LinearLayoutManager -import dev.chrisbanes.insetter.Insetter -import dev.chrisbanes.insetter.windowInsetTypesOf +import dev.chrisbanes.insetter.applyInsetter import eu.davidea.flexibleadapter.FlexibleAdapter import eu.davidea.flexibleadapter.SelectableAdapter import eu.kanade.tachiyomi.R @@ -80,9 +79,11 @@ class LibraryCategoryView @JvmOverloads constructor(context: Context, attrs: Att } } - Insetter.builder() - .paddingBottom(windowInsetTypesOf(navigationBars = true)) - .applyToView(recycler) + recycler.applyInsetter { + type(navigationBars = true) { + padding() + } + } adapter = LibraryCategoryAdapter(this)