NTP-7163 | Fix Firebase remote config default value issue (#13138)

This commit is contained in:
shankar yadav
2024-10-17 14:19:00 +05:30
committed by GitHub
parent b67029a050
commit 7820d7d08a

View File

@@ -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
}