mirror of
https://github.com/bitwarden/android.git
synced 2024-11-25 02:46:00 +03:00
Update naming: mutableAccessTokenFlow -> mutableAuthStateFlow (#56)
This commit is contained in:
parent
747dbdb4e7
commit
3de916cc20
1 changed files with 3 additions and 3 deletions
|
@ -24,8 +24,8 @@ class AuthRepositoryImpl @Inject constructor(
|
||||||
private val bitwardenSdkClient: Client,
|
private val bitwardenSdkClient: Client,
|
||||||
) : AuthRepository {
|
) : AuthRepository {
|
||||||
|
|
||||||
private val mutableAccessTokenFlow = MutableStateFlow<AuthState>(AuthState.Unauthenticated)
|
private val mutableAuthStateFlow = MutableStateFlow<AuthState>(AuthState.Unauthenticated)
|
||||||
override val authStateFlow: StateFlow<AuthState> = mutableAccessTokenFlow.asStateFlow()
|
override val authStateFlow: StateFlow<AuthState> = mutableAuthStateFlow.asStateFlow()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempt to login with the given email.
|
* Attempt to login with the given email.
|
||||||
|
@ -55,7 +55,7 @@ class AuthRepositoryImpl @Inject constructor(
|
||||||
LoginResult.Error
|
LoginResult.Error
|
||||||
},
|
},
|
||||||
onSuccess = {
|
onSuccess = {
|
||||||
mutableAccessTokenFlow.value = AuthState.Authenticated(it.accessToken)
|
mutableAuthStateFlow.value = AuthState.Authenticated(it.accessToken)
|
||||||
LoginResult.Success
|
LoginResult.Success
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue