Skip to content

Commit

Permalink
Remove unneccessary coroutine launches
Browse files Browse the repository at this point in the history
  • Loading branch information
gino-m committed Oct 26, 2023
1 parent bea8582 commit c3ee408
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,10 @@ constructor(
.blockingFirst() // TODO: Should this be blocking?

override fun init() {
externalScope.launch {
signInState.onNext(
if (firebaseAuth.currentUser == null) SignInState.signedOut()
else SignInState.signedIn(anonymousUser)
)
}
signInState.onNext(
if (firebaseAuth.currentUser == null) SignInState.signedOut()
else SignInState.signedIn(anonymousUser)
)
}

override fun signIn() {
Expand All @@ -69,9 +67,7 @@ constructor(
}

override fun signOut() {
externalScope.launch {
firebaseAuth.signOut()
signInState.onNext(SignInState.signedOut())
}
firebaseAuth.signOut()
signInState.onNext(SignInState.signedOut())
}
}

0 comments on commit c3ee408

Please sign in to comment.