Skip to content

Commit

Permalink
Update DetailsVeiwModel class
Browse files Browse the repository at this point in the history
  • Loading branch information
Tonnie-Dev committed Aug 14, 2024
1 parent cc229d3 commit 33194ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fun DetailScreenContent(
onPopBackStack: () -> Unit,
modifier: Modifier = Modifier
) {

val context = LocalContext.current

val scaffoldState = rememberBottomSheetScaffoldState()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow

@HiltViewModel
class DetailsViewModel @Inject constructor(
private val wrapper: UseCaseWrapper
) : ViewModel() {
class DetailsViewModel @Inject constructor() : ViewModel() {

private val _probability = MutableStateFlow(Random.nextInt(50, 100))
val probability = _probability.asStateFlow()
Expand All @@ -23,11 +21,11 @@ class DetailsViewModel @Inject constructor(
_isShowDialog.value = true
}

fun onDialogConfirm() {
fun onConfirmDialog() {
_isShowDialog.value = false
}

fun onDialogDismiss() {
fun onDismissDialog() {
_isShowDialog.value = false
}
}

0 comments on commit 33194ff

Please sign in to comment.