Skip to content

Commit

Permalink
fix: 축제 상세 swipe refresh 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyCh0 committed Oct 7, 2023
1 parent 2051ae9 commit 12ae504
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,21 +131,21 @@ class TicketReserveActivity : AppCompatActivity() {
festivalId = intent.getLongExtra(KEY_FESTIVAL_ID, -1),
refresh = true,
)
binding.srlTicketReserve.isRefreshing = false
}
}

private fun updateUi(uiState: TicketReserveUiState) = when (uiState) {
is TicketReserveUiState.Loading,
is TicketReserveUiState.Error,
-> binding.srlTicketReserve.isRefreshing = false
-> Unit

is TicketReserveUiState.Success -> updateSuccess(uiState)
}

private fun updateSuccess(successState: TicketReserveUiState.Success) {
headerAdapter.submitList(listOf(successState.festival))
contentsAdapter.submitList(successState.stages)
binding.srlTicketReserve.isRefreshing = false
}

companion object {
Expand Down

0 comments on commit 12ae504

Please sign in to comment.