Skip to content

Commit 0e78ff5

Browse files
authored
fix(android): cache not being updated in the background after initialized (#25)
1 parent 9f7b155 commit 0e78ff5

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

Diff for: android/src/main/kotlin/io/bucketeer/sdk/flutter/BucketeerFlutterClientSdkPlugin.kt

+8-8
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ class BucketeerFlutterClientSdkPlugin : MethodCallHandler, FlutterPlugin {
6767
val apiEndpoint = call.argument("apiEndpoint") as? String
6868
val featureTag = (call.argument("featureTag") as? String) ?: ""
6969
val eventsFlushInterval =
70-
call.argument("eventsFlushInterval") as? Long
70+
call.argument("eventsFlushInterval") as? Int
7171
val eventsMaxQueueSize =
7272
call.argument("eventsMaxQueueSize") as? Int
7373
val pollingInterval =
74-
call.argument("pollingInterval") as? Long
74+
call.argument("pollingInterval") as? Int
7575
val backgroundPollingInterval =
76-
call.argument("backgroundPollingInterval") as? Long
77-
val timeoutMillis = call.argument("timeoutMillis") as? Long
76+
call.argument("backgroundPollingInterval") as? Int
77+
val timeoutMillis = call.argument("timeoutMillis") as? Int
7878
val appVersion = call.argument("appVersion") as? String
7979
val userAttributes = call.argument("userAttributes") as? Map<String, String> ?: mapOf()
8080
if (apiKey.isNullOrEmpty()) {
@@ -96,7 +96,7 @@ class BucketeerFlutterClientSdkPlugin : MethodCallHandler, FlutterPlugin {
9696
.apiEndpoint(apiEndpoint)
9797
.featureTag(featureTag).let {
9898
if (eventsFlushInterval != null && eventsFlushInterval > 0) {
99-
return@let it.eventsFlushInterval(eventsFlushInterval)
99+
return@let it.eventsFlushInterval(eventsFlushInterval.toLong())
100100
}
101101
return@let it
102102
}.let {
@@ -106,12 +106,12 @@ class BucketeerFlutterClientSdkPlugin : MethodCallHandler, FlutterPlugin {
106106
return@let it
107107
}.let {
108108
if (pollingInterval != null && pollingInterval > 0) {
109-
return@let it.pollingInterval(pollingInterval)
109+
return@let it.pollingInterval(pollingInterval.toLong())
110110
}
111111
return@let it
112112
}.let {
113113
if (backgroundPollingInterval != null && backgroundPollingInterval > 0) {
114-
return@let it.pollingInterval(backgroundPollingInterval)
114+
return@let it.backgroundPollingInterval(backgroundPollingInterval.toLong())
115115
}
116116
return@let it
117117
}.let {
@@ -128,7 +128,7 @@ class BucketeerFlutterClientSdkPlugin : MethodCallHandler, FlutterPlugin {
128128
.build()
129129

130130
val future: Future<BKTException?> = if (timeoutMillis != null) {
131-
BKTClient.initialize(applicationContext!!, config, user, timeoutMillis)
131+
BKTClient.initialize(applicationContext!!, config, user, timeoutMillis.toLong())
132132
} else {
133133
BKTClient.initialize(applicationContext!!, config, user)
134134
}

Diff for: example/ios/Podfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PODS:
22
- Bucketeer (2.2.1)
3-
- bucketeer_flutter_client_sdk (2.1.0):
3+
- bucketeer_flutter_client_sdk (2.1.1):
44
- Bucketeer (= 2.2.1)
55
- Flutter
66
- Flutter (1.0.0)
@@ -37,7 +37,7 @@ EXTERNAL SOURCES:
3737

3838
SPEC CHECKSUMS:
3939
Bucketeer: 8b7f89fe85599dd5c18384fd9fd6aaa7ee5388bc
40-
bucketeer_flutter_client_sdk: ec0738228b7abdab817a45ad6c6b719afdde7e72
40+
bucketeer_flutter_client_sdk: 99397306b613410150a27094e442c1a56c5cb1f4
4141
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
4242
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
4343
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78

Diff for: example/pubspec.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ packages:
2323
path: ".."
2424
relative: true
2525
source: path
26-
version: "2.1.1"
26+
version: "2.1.2"
2727
characters:
2828
dependency: transitive
2929
description:

Diff for: pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: bucketeer_flutter_client_sdk
22
description: Bucketeer
3-
version: 2.1.1
3+
version: 2.1.2
44
homepage: https://bucketeer.io/
55
repository: https://github.com/bucketeer-io/flutter-client-sdk
66
documentation: https://docs.bucketeer.io/sdk/client-side/flutter

0 commit comments

Comments
 (0)