From 89ac493496527a39721eaaefa37b11983d1fe46a Mon Sep 17 00:00:00 2001 From: faisalcodes Date: Wed, 1 Feb 2023 22:41:04 +0530 Subject: [PATCH] Fix ktlint --- .../github/libretube/ui/adapters/BottomSheetAdapter.kt | 7 ++++++- .../com/github/libretube/ui/views/DrawableTextView.kt | 10 ++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/github/libretube/ui/adapters/BottomSheetAdapter.kt b/app/src/main/java/com/github/libretube/ui/adapters/BottomSheetAdapter.kt index 878b06584..917f4c241 100644 --- a/app/src/main/java/com/github/libretube/ui/adapters/BottomSheetAdapter.kt +++ b/app/src/main/java/com/github/libretube/ui/adapters/BottomSheetAdapter.kt @@ -29,7 +29,12 @@ class BottomSheetAdapter( setCompoundDrawablesRelative( if (item.drawable != null) { AppCompatResources.getDrawable(context, item.drawable) - } else null, null, null, null + } else { + null + }, + null, + null, + null ) setOnClickListener { diff --git a/app/src/main/java/com/github/libretube/ui/views/DrawableTextView.kt b/app/src/main/java/com/github/libretube/ui/views/DrawableTextView.kt index 84c704a5c..4c4f5e414 100644 --- a/app/src/main/java/com/github/libretube/ui/views/DrawableTextView.kt +++ b/app/src/main/java/com/github/libretube/ui/views/DrawableTextView.kt @@ -14,7 +14,7 @@ import com.github.libretube.R */ class DrawableTextView( context: Context, - attrs: AttributeSet? = null, + attrs: AttributeSet? = null ) : AppCompatTextView(context, attrs) { private var drawableStartDimen = 0F @@ -31,10 +31,12 @@ class DrawableTextView( drawableBottomDimen = getDimen(ta, R.styleable.DrawableTextView_drawableBottomDimen) gravity = ta.getInt( - R.styleable.DrawableTextView_android_gravity, Gravity.CENTER_VERTICAL + R.styleable.DrawableTextView_android_gravity, + Gravity.CENTER_VERTICAL ) compoundDrawablePadding = ta.getDimensionPixelOffset( - R.styleable.DrawableTextView_android_drawablePadding, 20 + R.styleable.DrawableTextView_android_drawablePadding, + 20 ) } finally { ta.recycle() @@ -110,4 +112,4 @@ class DrawableTextView( drawableEndDimen = end drawableBottomDimen = bottom } -} \ No newline at end of file +}