From a12323cb0ca102903e5e81d289f7eccfb74c1dea Mon Sep 17 00:00:00 2001 From: Farhan Arshad <43750646+farhan-arshad-dev@users.noreply.github.com> Date: Wed, 16 Oct 2024 12:14:41 +0500 Subject: [PATCH] fix: replaced outdated methods to resolve errors (#60) --- .../container/CourseContainerFragment.kt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/course/src/main/java/org/openedx/course/presentation/container/CourseContainerFragment.kt b/course/src/main/java/org/openedx/course/presentation/container/CourseContainerFragment.kt index 92c8fe55a..737d98518 100644 --- a/course/src/main/java/org/openedx/course/presentation/container/CourseContainerFragment.kt +++ b/course/src/main/java/org/openedx/course/presentation/container/CourseContainerFragment.kt @@ -86,6 +86,8 @@ import org.openedx.core.ui.CheckmarkView import org.openedx.core.ui.HandleUIMessage import org.openedx.core.ui.IAPErrorDialog import org.openedx.core.ui.OfflineModeDialog +import org.openedx.core.ui.OpenEdXBrandButton +import org.openedx.core.ui.OpenEdXOutlineBrandButton import org.openedx.core.ui.OpenEdXOutlinePrimaryButton import org.openedx.core.ui.OpenEdXPrimaryButton import org.openedx.core.ui.RoundTabsBar @@ -288,7 +290,7 @@ class CourseContainerFragment : Fragment(R.layout.fragment_course_container) { CalendarSyncDialogType.LOADING_DIALOG, CalendarSyncDialogType.PERMISSION_DIALOG, CalendarSyncDialogType.NONE, - -> { + -> { } } @@ -468,7 +470,7 @@ fun CourseDashboard( CourseAccessError.AUDIT_EXPIRED_NOT_UPGRADABLE, CourseAccessError.NOT_YET_STARTED, CourseAccessError.UNKNOWN, - -> { + -> { CourseAccessErrorView( viewModel = viewModel, accessError = accessStatus.value, @@ -763,7 +765,7 @@ private fun AuditExpiredUpgradableView( CheckmarkView(stringResource(id = org.openedx.core.R.string.iap_full_access_course)) } - OpenEdXOutlinedButton( + OpenEdXOutlineBrandButton( text = stringResource(R.string.course_find_new_course_button), backgroundColor = MaterialTheme.appColors.background, textColor = MaterialTheme.appColors.primary, @@ -777,7 +779,7 @@ private fun AuditExpiredUpgradableView( is IAPUIState.Loading, is IAPUIState.PurchaseProduct, is IAPUIState.Error, - -> { + -> { CircularProgressIndicator( modifier = Modifier .size(42.dp), @@ -786,7 +788,7 @@ private fun AuditExpiredUpgradableView( } is IAPUIState.ProductData -> { - OpenEdXButton(modifier = Modifier.fillMaxWidth(), + OpenEdXBrandButton(modifier = Modifier.fillMaxWidth(), text = stringResource( id = org.openedx.core.R.string.iap_upgrade_price, viewModel.purchaseFlowData.formattedPrice ?: 0.0, @@ -910,7 +912,7 @@ private fun SetupCourseAccessErrorButtons( when (accessError) { CourseAccessError.AUDIT_EXPIRED_NOT_UPGRADABLE, CourseAccessError.NOT_YET_STARTED, - -> { + -> { OpenEdXPrimaryButton( text = stringResource(R.string.course_label_back), onClick = { fragmentManager.popBackStack() },