From a6b4bacd21d50657d57769010bdc3605b5e3b5ff Mon Sep 17 00:00:00 2001 From: Hamza Israr <71447999+HamzaIsrar12@users.noreply.github.com> Date: Wed, 24 Jan 2024 16:16:36 +0500 Subject: [PATCH] fix: Fetching price for expired courses (#1843) Fixes: LEARNER-9759 --- .../java/org/edx/mobile/view/CourseTabsDashboardFragment.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenEdXMobile/src/main/java/org/edx/mobile/view/CourseTabsDashboardFragment.kt b/OpenEdXMobile/src/main/java/org/edx/mobile/view/CourseTabsDashboardFragment.kt index 1b6b3c890a..f54ed1d207 100644 --- a/OpenEdXMobile/src/main/java/org/edx/mobile/view/CourseTabsDashboardFragment.kt +++ b/OpenEdXMobile/src/main/java/org/edx/mobile/view/CourseTabsDashboardFragment.kt @@ -35,6 +35,7 @@ import org.edx.mobile.event.MyCoursesRefreshEvent import org.edx.mobile.event.RefreshCourseDashboardEvent import org.edx.mobile.exception.ErrorMessage import org.edx.mobile.extenstion.CollapsingToolbarStatListener +import org.edx.mobile.extenstion.isNotNullOrEmpty import org.edx.mobile.extenstion.serializable import org.edx.mobile.extenstion.serializableOrThrow import org.edx.mobile.extenstion.setTitleStateListener @@ -244,7 +245,8 @@ class CourseTabsDashboardFragment : BaseFragment() { private fun setupIAPLayout() { val isPurchaseEnabled = environment.featuresPrefs.isIAPEnabledForUser( environment.loginPrefs.isOddUserId - ) + ) && courseData.courseSku.isNotNullOrEmpty() + binding.accessError.apply { setVisibility(true) setState(State.IS_UPGRADEABLE, null)