Skip to content

Commit 865e0b4

Browse files
committed
fix bux post QA
1 parent 5bfc9a1 commit 865e0b4

File tree

5 files changed

+44
-37
lines changed

5 files changed

+44
-37
lines changed

lib/cache/default_cache.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ class DefaultCacheVisitorImp with IVisitorCacheImplementation {
9898

9999
@override
100100
Future<bool> visitorExists(String visitorId) async {
101+
// Rejeter les strings vides
102+
if (visitorId.isEmpty) {
103+
return false;
104+
}
101105
Flagship.logger(
102106
Level.DEBUG, "visitorExists from default cache Implementation");
103107
await _checkDatabase();

lib/decision/bucketing_manager.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,10 @@ class BucketingManager extends DecisionManager {
150150
if (this.assignationHistory == null) {
151151
this.assignationHistory = Map.fromEntries(newAssign.entries);
152152
} else {
153-
this.assignationHistory?.clear();
154-
this.assignationHistory?.addEntries(newAssign.entries);
153+
this.assignationHistory = {
154+
...this.assignationHistory ?? <String, dynamic>{},
155+
...newAssign
156+
};
155157
}
156158
}
157159

lib/visitor.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ class Visitor with EmotionAiDelegate {
305305

306306
// Private function to handle visitor lookup logic
307307
Future<void> _performVisitorLookupIfNeeded() async {
308-
// if (!_needLookupVisitor) return; // temporary disable to always lookup visitor
308+
if (!_needLookupVisitor)
309+
return; // temporary disable to always lookup visitor
309310

310311
String? idToLookup;
311312

lib/visitor/strategy/default_strategy.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ class DefaultStrategy implements IVisitor {
244244
visitor.anonymousId != null) {
245245
// Check if cache exists for anonymousId
246246
bool anonymousExists = await visitor.config.visitorCacheImp
247-
?.visitorExists(visitor.anonymousId!) ??
247+
?.visitorExists(visitor.anonymousId ?? "") ??
248248
false;
249249

250250
if (!anonymousExists) {
@@ -326,15 +326,15 @@ class DefaultStrategy implements IVisitor {
326326
}
327327

328328
@override
329-
void cacheVisitor(String visitorId, String jsonString) {
330-
visitor.config.visitorCacheImp?.cacheVisitor(visitor.visitorId, jsonString);
329+
void cacheVisitor(String pVisitorId, String jsonString) {
330+
visitor.config.visitorCacheImp?.cacheVisitor(pVisitorId, jsonString);
331331
}
332332

333333
@override
334334
// Called right at visitor creation, return a jsonString corresponding to visitor. Return a jsonString
335-
Future<bool> lookupVisitor(String visitoId) async {
335+
Future<bool> lookupVisitor(String visitorId) async {
336336
var resultFromCacheBis = await visitor.config.visitorCacheImp
337-
?.lookupVisitor(visitor.visitorId)
337+
?.lookupVisitor(visitorId)
338338
.timeout(
339339
Duration(
340340
milliseconds:

pubspec.lock

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ packages:
109109
dependency: transitive
110110
description:
111111
name: characters
112-
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
112+
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
113113
url: "https://pub.dev"
114114
source: hosted
115-
version: "1.3.0"
115+
version: "1.4.0"
116116
checked_yaml:
117117
dependency: transitive
118118
description:
@@ -125,10 +125,10 @@ packages:
125125
dependency: transitive
126126
description:
127127
name: clock
128-
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
128+
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
129129
url: "https://pub.dev"
130130
source: hosted
131-
version: "1.1.1"
131+
version: "1.1.2"
132132
code_builder:
133133
dependency: transitive
134134
description:
@@ -141,10 +141,10 @@ packages:
141141
dependency: "direct main"
142142
description:
143143
name: collection
144-
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
144+
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
145145
url: "https://pub.dev"
146146
source: hosted
147-
version: "1.19.0"
147+
version: "1.19.1"
148148
convert:
149149
dependency: transitive
150150
description:
@@ -189,10 +189,10 @@ packages:
189189
dependency: transitive
190190
description:
191191
name: fake_async
192-
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
192+
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
193193
url: "https://pub.dev"
194194
source: hosted
195-
version: "1.3.1"
195+
version: "1.3.3"
196196
ffi:
197197
dependency: transitive
198198
description:
@@ -332,26 +332,26 @@ packages:
332332
dependency: transitive
333333
description:
334334
name: leak_tracker
335-
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
335+
sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
336336
url: "https://pub.dev"
337337
source: hosted
338-
version: "10.0.7"
338+
version: "11.0.2"
339339
leak_tracker_flutter_testing:
340340
dependency: transitive
341341
description:
342342
name: leak_tracker_flutter_testing
343-
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
343+
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
344344
url: "https://pub.dev"
345345
source: hosted
346-
version: "3.0.8"
346+
version: "3.0.10"
347347
leak_tracker_testing:
348348
dependency: transitive
349349
description:
350350
name: leak_tracker_testing
351-
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
351+
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
352352
url: "https://pub.dev"
353353
source: hosted
354-
version: "3.0.1"
354+
version: "3.0.2"
355355
logging:
356356
dependency: transitive
357357
description:
@@ -364,10 +364,10 @@ packages:
364364
dependency: transitive
365365
description:
366366
name: matcher
367-
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
367+
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
368368
url: "https://pub.dev"
369369
source: hosted
370-
version: "0.12.16+1"
370+
version: "0.12.17"
371371
material_color_utilities:
372372
dependency: transitive
373373
description:
@@ -380,10 +380,10 @@ packages:
380380
dependency: transitive
381381
description:
382382
name: meta
383-
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
383+
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
384384
url: "https://pub.dev"
385385
source: hosted
386-
version: "1.15.0"
386+
version: "1.16.0"
387387
mime:
388388
dependency: transitive
389389
description:
@@ -428,10 +428,10 @@ packages:
428428
dependency: "direct main"
429429
description:
430430
name: path
431-
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
431+
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
432432
url: "https://pub.dev"
433433
source: hosted
434-
version: "1.9.0"
434+
version: "1.9.1"
435435
path_provider:
436436
dependency: "direct main"
437437
description:
@@ -697,18 +697,18 @@ packages:
697697
dependency: transitive
698698
description:
699699
name: stack_trace
700-
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
700+
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
701701
url: "https://pub.dev"
702702
source: hosted
703-
version: "1.12.0"
703+
version: "1.12.1"
704704
stream_channel:
705705
dependency: transitive
706706
description:
707707
name: stream_channel
708-
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
708+
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
709709
url: "https://pub.dev"
710710
source: hosted
711-
version: "2.1.2"
711+
version: "2.1.4"
712712
stream_transform:
713713
dependency: transitive
714714
description:
@@ -745,10 +745,10 @@ packages:
745745
dependency: transitive
746746
description:
747747
name: test_api
748-
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
748+
sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
749749
url: "https://pub.dev"
750750
source: hosted
751-
version: "0.7.3"
751+
version: "0.7.6"
752752
timing:
753753
dependency: transitive
754754
description:
@@ -777,10 +777,10 @@ packages:
777777
dependency: transitive
778778
description:
779779
name: vector_math
780-
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
780+
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
781781
url: "https://pub.dev"
782782
source: hosted
783-
version: "2.1.4"
783+
version: "2.2.0"
784784
vm_service:
785785
dependency: transitive
786786
description:
@@ -854,5 +854,5 @@ packages:
854854
source: hosted
855855
version: "3.1.3"
856856
sdks:
857-
dart: ">=3.6.0 <4.0.0"
857+
dart: ">=3.8.0-0 <4.0.0"
858858
flutter: ">=3.27.0"

0 commit comments

Comments
 (0)