Skip to content

Commit

Permalink
[MOD] #314 스크랩 서버통신이 로딩 상태일 때는 로딩 프로그레스바 띄우도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeha committed Feb 14, 2024
1 parent b8852f2 commit c7b1f90
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,17 @@ class StorageScrapFragment :
private fun setupCourseScrapStateObserver() {
viewModel.courseScrapState.observe(viewLifecycleOwner) { state ->
when (state) {
is UiStateV2.Loading -> {
showLoadingProgressBar()
}

is UiStateV2.Success -> {
dismissLoadingProgressBar()
storageScrapAdapter.removeCourseItem()
}

is UiStateV2.Failure -> {
dismissLoadingProgressBar()
context?.showSnackbar(
anchorView = binding.root,
message = state.msg
Expand Down

0 comments on commit c7b1f90

Please sign in to comment.