AppDetails: Do not animate icon, if there is no icon

This commit is contained in:
Rahul Patel
2024-12-04 20:12:06 +05:30
parent 52c1acf6d4
commit bd231a1d7b

View File

@@ -586,6 +586,8 @@ class AppDetailsFragment : BaseFragment<FragmentDetailsBinding>() {
} }
private fun transformIcon(ongoing: Boolean = false) { private fun transformIcon(ongoing: Boolean = false) {
if (::iconDrawable.isInitialized.not()) return
val scaleFactor = if (ongoing) 0.75f else 1f val scaleFactor = if (ongoing) 0.75f else 1f
val isDownloadVisible = binding.layoutDetailsApp.progressDownload.isShown val isDownloadVisible = binding.layoutDetailsApp.progressDownload.isShown
@@ -615,7 +617,7 @@ class AppDetailsFragment : BaseFragment<FragmentDetailsBinding>() {
} }
} }
iconDrawable?.let { iconDrawable.let {
binding.layoutDetailsApp.imgIcon.load(it) { binding.layoutDetailsApp.imgIcon.load(it) {
transformations( transformations(
if (scaleFactor == 1f) if (scaleFactor == 1f)