Skip to content

Commit

Permalink
[FEATURE]#223 : 회원탈퇴 API 호출 전, 모달 닫도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongjaino committed Jan 26, 2025
1 parent f2fda36 commit 4acc81d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ fun AccountSettingScreen(
is EntireSideEffect.CloseSignOutDialog -> {
showDialog = false
}
is EntireSideEffect.CloseRevokeDialog -> { }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ fun RevokeConfirmScreen(
intent.putExtra(EXTRA_TOAST_MESSAGE, context.getString(R.string.revoke_done))
context.startActivity(intent)
}
else -> { }

is EntireSideEffect.CloseRevokeDialog -> {
showDialog = false
}

is EntireSideEffect.CloseSignOutDialog -> { }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ package com.bff.wespot.entire.state
sealed class EntireSideEffect {
data object NavigateToAuth : EntireSideEffect()
data object CloseSignOutDialog : EntireSideEffect()
data object CloseRevokeDialog : EntireSideEffect()
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ class EntireViewModel @Inject constructor(
}

private fun handleRevoke() = intent {
postSideEffect(EntireSideEffect.CloseRevokeDialog)
reduce { state.copy(isLoading = true) }

val revokeReason = if (state.isInputRevokeReasonSelected) {
state.revokeReasonList + state.inputRevokeReason
} else {
Expand All @@ -119,7 +121,6 @@ class EntireViewModel @Inject constructor(
}

private fun handleSignOut() = intent {
postSideEffect(EntireSideEffect.CloseSignOutDialog)
reduce { state.copy(isLoading = true) }

viewModelScope.launch(coroutineDispatcher) {
Expand Down

0 comments on commit 4acc81d

Please sign in to comment.