@@ -25,7 +25,6 @@ import android.content.Context
2525import android.content.Intent
2626import android.content.SharedPreferences
2727import android.graphics.Typeface
28- import android.graphics.drawable.Drawable
2928import android.graphics.drawable.LayerDrawable
3029import android.os.Bundle
3130import android.os.Parcelable
@@ -37,7 +36,6 @@ import android.view.MenuItem
3736import android.view.View
3837import android.view.ViewGroup
3938import android.widget.Button
40- import androidx.annotation.AttrRes
4139import androidx.annotation.Nullable
4240import androidx.appcompat.app.AlertDialog
4341import androidx.appcompat.content.res.AppCompatResources
@@ -80,6 +78,7 @@ import org.schabi.newpipe.util.DeviceUtils
8078import org.schabi.newpipe.util.Localization
8179import org.schabi.newpipe.util.NavigationHelper
8280import org.schabi.newpipe.util.ThemeHelper.getGridSpanCountStreams
81+ import org.schabi.newpipe.util.ThemeHelper.resolveDrawable
8382import org.schabi.newpipe.util.ThemeHelper.shouldUseGridLayout
8483import java.time.OffsetDateTime
8584import java.util.function.Consumer
@@ -579,19 +578,6 @@ class FeedFragment : BaseStateFragment<FeedState>() {
579578 lastNewItemsCount = highlightCount
580579 }
581580
582- private fun resolveDrawable (context : Context , @AttrRes attrResId : Int ): Drawable ? {
583- return androidx.core.content.ContextCompat .getDrawable(
584- context,
585- android.util.TypedValue ().apply {
586- context.theme.resolveAttribute(
587- attrResId,
588- this ,
589- true
590- )
591- }.resourceId
592- )
593- }
594-
595581 private fun showNewItemsLoaded () {
596582 tryGetNewItemsLoadedButton()?.clearAnimation()
597583 tryGetNewItemsLoadedButton()
0 commit comments