NTP-7163 | Fix Firebase remote config default value issue (#13138)
This commit is contained in:
@@ -307,7 +307,9 @@ object FirebaseRemoteConfigHelper {
|
||||
|
||||
fun getBoolean(key: String, defaultValue: Boolean): Boolean {
|
||||
return try {
|
||||
remoteConfig.getBoolean(key)
|
||||
val rawValue = remoteConfig.getValue(key)
|
||||
if (rawValue.source == FirebaseRemoteConfig.VALUE_SOURCE_STATIC) defaultValue
|
||||
else rawValue.asBoolean()
|
||||
} catch (e: Exception) {
|
||||
defaultValue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user