File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
firebaseLib/src/main/java/ai/bom/firebase/lib/config Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package ai.bom.firebase.lib.config
22
33import ai.bom.firebase.lib.BuildConfig
44import android.content.Context
5+ import android.util.Log
56import androidx.annotation.Keep
67import com.google.firebase.remoteconfig.FirebaseRemoteConfig
78import com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings
@@ -42,9 +43,14 @@ class RemoteConfigDate(private val remoteTopic: String) {
4243 fun getRemoteConfig (context : Context , listener : ((Any? ) -> Unit )) {
4344 getInstance()?.reset()
4445 getInstance()?.fetchAndActivate()
45- ?.addOnCompleteListener { _ ->
46- val value = getRemoteConfig(context)
47- listener.invoke(value)
46+ ?.addOnCompleteListener { task ->
47+ Log .e(" RemoteConfigNew*" , " status : ${task.isSuccessful} " )
48+ if (task.isSuccessful) {
49+ val value = getRemoteConfig(context)
50+ listener.invoke(value)
51+ } else {
52+ listener.invoke(getRemoteConfig(context))
53+ }
4854 }
4955 }
5056}
You can’t perform that action at this time.
0 commit comments