Skip to content

Commit

Permalink
Version bump to 0.2.6-alpha. Fixed issue with remoteConfig not work…
Browse files Browse the repository at this point in the history
…ing properly.
  • Loading branch information
HLCaptain committed Apr 4, 2023
1 parent aa0f77b commit 0727d6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ android {
applicationId "illyan.jay"
minSdk 21
targetSdk 33
versionCode 8
versionName "0.2.5-alpha"
versionCode 9
versionName "0.2.6-alpha"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ import com.google.firebase.analytics.ktx.logEvent
import com.google.firebase.auth.AuthCredential
import com.google.firebase.auth.FirebaseAuth
import com.google.firebase.auth.GoogleAuthProvider
import com.google.firebase.ktx.Firebase
import com.google.firebase.remoteconfig.FirebaseRemoteConfig
import com.google.firebase.remoteconfig.ktx.get
import com.google.firebase.remoteconfig.ktx.remoteConfig
import illyan.jay.MainActivity
import illyan.jay.R
import illyan.jay.di.CoroutineScopeIO
Expand All @@ -60,6 +59,7 @@ class AuthInteractor @Inject constructor(
private val auth: FirebaseAuth,
private val context: Context,
private val analytics: FirebaseAnalytics,
private val remoteConfig: FirebaseRemoteConfig,
@CoroutineScopeIO private val coroutineScopeIO: CoroutineScope,
) {
private val _currentUserStateFlow = MutableStateFlow(auth.currentUser)
Expand Down Expand Up @@ -137,12 +137,12 @@ class AuthInteractor @Inject constructor(
fun signInViaGoogle(activity: MainActivity) {
if (isUserSignedIn) return
if (_googleSignInClient.value == null) {
Firebase.remoteConfig.fetchAndActivate().addOnCompleteListener {
remoteConfig.ensureInitialized().addOnCompleteListener {
_googleSignInClient.value = GoogleSignIn.getClient(
activity,
GoogleSignInOptions
.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestIdToken(Firebase.remoteConfig["default_web_client_id"].asString())
.requestIdToken(remoteConfig["default_web_client_id"].asString())
.requestEmail()
.build()
)
Expand Down

0 comments on commit 0727d6b

Please sign in to comment.