Skip to content

Commit

Permalink
[FIX] #107 : 뒤로가기 및 아웃 사이드 클릭시 디알로그 꺼지도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongjaino committed Jan 14, 2024
1 parent 9bb7bac commit e29f692
Showing 1 changed file with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.DialogProperties
import androidx.hilt.navigation.compose.hiltViewModel
import com.wap.designsystem.WappTheme
import com.wap.designsystem.component.WappButton
Expand All @@ -33,26 +32,21 @@ fun ManagementCodeValidationDialog(
LaunchedEffect(true) {
viewModel.managementCodeUiState.collectLatest {
when (it) {
is ManagementCodeUiState.Init -> {}
is ManagementCodeUiState.Success -> {
onDismissRequest()
}

is ManagementCodeUiState.Failure -> {
showToast(it.throwable)
}

is ManagementCodeUiState.Init -> {}
}
}
}

AlertDialog(
onDismissRequest = { onDismissRequest() },
modifier = Modifier.padding(horizontal = 16.dp),
properties = DialogProperties(
dismissOnBackPress = false,
dismissOnClickOutside = false,
),
) {
Column(
modifier = Modifier.padding(16.dp),
Expand Down Expand Up @@ -94,13 +88,3 @@ fun ManagementCodeValidationDialog(
}
}
}

/*
@Preview
@Composable
fun previewDialog() {
WappTheme {
ManageCodeDialog()
}
}
*/

0 comments on commit e29f692

Please sign in to comment.