Skip to content

Commit

Permalink
fix: lint checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh-AhsanArif committed Feb 12, 2025
1 parent addb8a5 commit 45b39b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ class CourseRepository(
suspend fun getCourseStructureFlow(courseId: String, forceRefresh: Boolean = true): Flow<CourseStructure> =
channelFlowWithAwait {
var hasCourseStructure = false
val cachedCourseStructure =
courseStructure[courseId] ?: (courseDao.getCourseStructureById(courseId)
?.mapToDomain())
val cachedCourseStructure = courseStructure[courseId] ?: (
courseDao.getCourseStructureById(courseId)?.mapToDomain()
)
if (cachedCourseStructure != null) {
hasCourseStructure = true
trySend(cachedCourseStructure)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ class CourseOutlineViewModel(
val courseStatusFlow = interactor.getCourseStatusFlow(courseId)
val courseDatesFlow = interactor.getCourseDatesFlow(courseId)
combine(
courseStructureFlow, courseStatusFlow, courseDatesFlow
courseStructureFlow,
courseStatusFlow,
courseDatesFlow
) { courseStructure, courseStatus, courseDatesResult ->
Triple(courseStructure, courseStatus, courseDatesResult)
}.collect { (courseStructure, courseStatus, courseDates) ->
Expand Down

0 comments on commit 45b39b8

Please sign in to comment.