Skip to content

Commit

Permalink
Fix review issues
Browse files Browse the repository at this point in the history
  • Loading branch information
XanderZhu committed Oct 11, 2023
1 parent 19de95f commit 53660eb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class HomeActionDispatcher(

override suspend fun doSuspendableAction(action: Action) {
when (action) {
is Action.FetchHomeScreenData -> fetchHomeScreenData()
is Action.FetchHomeScreenData -> handleFetchHomeScreenData(::onNewMessage)
is Action.LaunchTimer -> {
if (isTimerLaunched) {
return
Expand Down Expand Up @@ -107,7 +107,7 @@ class HomeActionDispatcher(
}
}

private suspend fun fetchHomeScreenData() {
private suspend fun handleFetchHomeScreenData(onNewMessage: (Message) -> Unit) {
sentryInteractor.withTransaction(
HyperskillSentryTransactionBuilder.buildHomeScreenRemoteDataLoading(),
onError = { setOf(Message.HomeFailure) }
Expand All @@ -128,7 +128,7 @@ class HomeActionDispatcher(
Message.ReadyToLaunchNextProblemInTimer
)
}
}.forEach(::onNewMessage)
}.forEach(onNewMessage)
}

private suspend fun getProblemOfDayState(dailyStepId: Long?): Result<HomeFeature.ProblemOfDayState> =
Expand Down

0 comments on commit 53660eb

Please sign in to comment.