Skip to content

Commit

Permalink
refactor: VolunteerProfileViewModel 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
kang9366 committed Feb 17, 2024
1 parent 3b2da7b commit 74983d7
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.kusitms.connectdog.feature.signup.volunteer

import androidx.compose.runtime.MutableState
import androidx.compose.runtime.mutableStateOf
import androidx.lifecycle.ViewModel
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class VolunteerProfileViewModel @Inject constructor() : ViewModel() {
private val _isProfileImageSelected: MutableState<Boolean> = mutableStateOf(false)
private val _isNicknameAvailable: MutableState<Boolean> = mutableStateOf(false)

val isProfileImageSelected get() = _isProfileImageSelected.value
val isNicknameAvailable get() = _isNicknameAvailable.value

fun updateProfileImageSelected(selected: Boolean) {
_isProfileImageSelected.value = selected
}

fun updateNicknameAvailability(available: Boolean) {
_isNicknameAvailable.value = available
}
}

0 comments on commit 74983d7

Please sign in to comment.