Use if instead of non-exhaustive when clause
Kotlin 1.7.0 requires when statements on enums to be exhaustive. Switch from a when with a single clause to an if statement. Bug: 216136346 Test: m CredentialManager Change-Id: Ief5a38ba1af05f6cd882a1e035538a44ff2753d3
This commit is contained in:
@@ -79,10 +79,8 @@ fun CreatePasskeyScreen(
|
||||
sheetShape = Shapes.medium,
|
||||
) {}
|
||||
LaunchedEffect(state.currentValue) {
|
||||
when (state.currentValue) {
|
||||
ModalBottomSheetValue.Hidden -> {
|
||||
cancelActivity()
|
||||
}
|
||||
if (state.currentValue == ModalBottomSheetValue.Hidden) {
|
||||
cancelActivity()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,10 +64,8 @@ fun GetCredentialScreen(
|
||||
sheetShape = Shapes.medium,
|
||||
) {}
|
||||
LaunchedEffect(state.currentValue) {
|
||||
when (state.currentValue) {
|
||||
ModalBottomSheetValue.Hidden -> {
|
||||
cancelActivity()
|
||||
}
|
||||
if (state.currentValue == ModalBottomSheetValue.Hidden) {
|
||||
cancelActivity()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user