Use more Compat utilities (#5786)

* Use ActivityCompat.recreate

* Use more KTX extensions

* Use PackageInfoCompat.getLongVersionCode

* Remove unnecessary compat usages
This commit is contained in:
Taco
2021-08-27 16:33:12 -04:00
committed by GitHub
parent edcfa28b0b
commit 12a9d0575d
20 changed files with 76 additions and 80 deletions
@@ -7,7 +7,6 @@ import android.view.ViewGroup
import androidx.annotation.AttrRes
import androidx.annotation.CallSuper
import androidx.appcompat.content.res.AppCompatResources
import androidx.core.content.ContextCompat
import androidx.core.view.isVisible
import androidx.recyclerview.widget.RecyclerView
import eu.kanade.tachiyomi.R
@@ -102,7 +101,7 @@ open class ExtendedNavigationView @JvmOverloads constructor(
return when (state) {
SORT_ASC -> tintVector(context, R.drawable.ic_arrow_up_white_32dp)
SORT_DESC -> tintVector(context, R.drawable.ic_arrow_down_white_32dp)
SORT_NONE -> ContextCompat.getDrawable(context, R.drawable.empty_drawable_32dp)
SORT_NONE -> AppCompatResources.getDrawable(context, R.drawable.empty_drawable_32dp)
else -> null
}
}