Skip to content

Commit 21f456b

Browse files
committed
Using latest Kotlin SDK
1 parent f41d388 commit 21f456b

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Please check the [Github Releases](https://github.com/configcat/openfeature-ruby/releases) page for the changelog of the ConfigCat OpenFeature Provider for Ruby.
1+
Please check the [Github Releases](https://github.com/configcat/openfeature-kotlin/releases) page for the changelog of the ConfigCat OpenFeature Provider for Kotlin.

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[versions]
22
kotlin = "2.1.10"
33
android-gradle-plugin = "8.7.3"
4-
configcat = "4.2.0"
4+
configcat = "5.0.0"
55
openfeature = "0.4.1"
66
ktor = "3.0.0"
77
kotlinx-serialization = "1.7.3"

src/main/kotlin/com/configcat/ConfigCatProvider.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,10 @@ class ConfigCatProvider(
4949
private val snapshot: AtomicRef<ConfigCatClientSnapshot?> = atomic(null)
5050
private val user: AtomicRef<ConfigCatUser?> = atomic(null)
5151
private val initialized: AtomicBoolean = atomic(false)
52-
private val client: ConfigCatClient
52+
val client: ConfigCatClient
5353

5454
init {
55-
options.hooks.addOnConfigChanged {
56-
val sn = client.snapshot()
55+
options.hooks.addOnConfigChanged { _, sn ->
5756
snapshot.value = sn
5857
if (sn.cacheState != ClientCacheState.NO_FLAG_DATA && initialized.compareAndSet(expect = false, update = true)) {
5958
if (!events.tryEmit(OpenFeatureProviderEvents.ProviderReady)) {

0 commit comments

Comments
 (0)