Skip to content

Commit

Permalink
fix: Resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
omerhabib26 committed Jul 25, 2024
1 parent 625918c commit 40cf719
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@ class CourseContainerViewModel(
get() = iapConfig.isEnabled &&
iapConfig.disableVersions.contains(appData.versionName).not()

private val isPaymentEnabled
get() = isIAPEnabled && isValuePropEnabled

private var _canShowUpgradeButton = MutableStateFlow(false)
val canShowUpgradeButton: StateFlow<Boolean>
get() = _canShowUpgradeButton.asStateFlow()
Expand Down Expand Up @@ -210,7 +207,7 @@ class CourseContainerViewModel(
_courseDetails = interactor.getEnrollmentDetails(courseId)
_courseDetails?.let { courseDetails ->
courseName = courseDetails.courseInfoOverview.name
_canShowUpgradeButton.value = isPaymentEnabled && courseDetails.isUpgradeable
_canShowUpgradeButton.value = isIAPEnabled && courseDetails.isUpgradeable
loadCourseImage(courseDetails.courseInfoOverview.media?.image?.large)
if (courseDetails.hasAccess.isFalse()) {
_showProgress.value = false
Expand Down Expand Up @@ -339,7 +336,7 @@ class CourseContainerViewModel(
try {
_courseStructure = interactor.getCourseStructure(courseId, isNeedRefresh = true)
_canShowUpgradeButton.value =
isPaymentEnabled && courseStructure?.isUpgradeable.isTrue()
isIAPEnabled && courseStructure?.isUpgradeable.isTrue()
} catch (e: Exception) {
if (e.isInternetError()) {
_errorMessage.value =
Expand Down

0 comments on commit 40cf719

Please sign in to comment.