updated the code
This commit is contained in:
@@ -15,14 +15,10 @@ class SettingsViewModel @Inject constructor(
|
||||
private val loginDataStore: LoginDataStore,
|
||||
private val firebaseFirestore: FirebaseFirestore
|
||||
) : ViewModel() {
|
||||
private val _isLoggedIn = MutableStateFlow(false)
|
||||
val isLoggedIn = _isLoggedIn.asStateFlow()
|
||||
|
||||
|
||||
fun logout() {
|
||||
viewModelScope.launch {
|
||||
loginDataStore.clearLoginData()
|
||||
_isLoggedIn.value = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user