Skip to content

Commit

Permalink
SDK_READY missing condition
Browse files Browse the repository at this point in the history
  • Loading branch information
gthea committed Sep 4, 2024
1 parent 0e18d36 commit f00bfb6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ apply plugin: 'kotlin-android'
apply from: 'spec.gradle'

ext {
splitVersion = '4.3.0-alpha.3'
splitVersion = '4.3.0-alpha.4'
}

android {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public void notifyInternalEvent(SplitInternalEvent internalEvent) {
return;
}
try {
Logger.v("Internal event: " + internalEvent.name());
mQueue.add(internalEvent);
} catch (IllegalStateException e) {
Logger.d("Internal events queue is full");
Expand Down Expand Up @@ -188,7 +189,7 @@ private boolean isTriggered(SplitEvent event) {
}

private void triggerSdkReadyIfNeeded() {
if ((wasTriggered(SplitInternalEvent.MY_SEGMENTS_UPDATED) || wasTriggered(SplitInternalEvent.MY_SEGMENTS_FETCHED)) &&
if ((wasTriggered(SplitInternalEvent.MY_SEGMENTS_UPDATED) || wasTriggered(SplitInternalEvent.MY_SEGMENTS_FETCHED) || wasTriggered(SplitInternalEvent.MY_LARGE_SEGMENTS_UPDATED)) &&
(wasTriggered(SplitInternalEvent.SPLITS_UPDATED) || wasTriggered(SplitInternalEvent.SPLITS_FETCHED)) &&
!isTriggered(SplitEvent.SDK_READY)) {
trigger(SplitEvent.SDK_READY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import io.split.android.client.dtos.Segment;
import io.split.android.client.dtos.SegmentsChange;
import io.split.android.client.utils.logger.Logger;

class MySegmentsStorageImpl implements MySegmentsStorage {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,8 @@ private SegmentsChange getMySegmentsFromEntity(SegmentEntity entity) {
return createEmpty();
}

SegmentsChange dto;
try {
dto = Json.fromJson(storedJson, SegmentsChange.class);

Logger.v("Returning segments from DTO");
return dto;
return Json.fromJson(storedJson, SegmentsChange.class);
} catch (JsonParseException | NullPointerException ex) {
Logger.v("Parsing of segments DTO failed, returning as legacy");
String[] segments = storedJson.split(",");
Expand Down

0 comments on commit f00bfb6

Please sign in to comment.