Skip to content

Commit

Permalink
Update demo app
Browse files Browse the repository at this point in the history
  • Loading branch information
MatkovIvan committed Nov 8, 2018
1 parent 292f608 commit 4f49c6a
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public void send(@SuppressWarnings("UnusedParameters") View view) {
Map<String, String> properties = null;
EventProperties typedProperties = null;
if (mProperties.size() > 0) {
if (onlyStringProperties() && (persistenceFlag == PersistenceFlag.DEFAULT || target == null)) {
if (onlyStringProperties()) {
properties = new HashMap<>();
for (TypedPropertyFragment fragment : mProperties) {
fragment.set(properties);
Expand Down Expand Up @@ -256,12 +256,18 @@ public void send(@SuppressWarnings("UnusedParameters") View view) {
Analytics.trackEvent(name);
}
} else {
if (persistenceFlag != PersistenceFlag.DEFAULT) {
target.trackEvent(name, typedProperties, flags);
} else if (typedProperties != null) {
target.trackEvent(name, typedProperties);
if (typedProperties != null) {
if (persistenceFlag != PersistenceFlag.DEFAULT) {
target.trackEvent(name, typedProperties, flags);
} else {
target.trackEvent(name, typedProperties);
}
} else if (properties != null) {
target.trackEvent(name, properties);
if (persistenceFlag != PersistenceFlag.DEFAULT) {
target.trackEvent(name, properties, flags);
} else {
target.trackEvent(name, properties);
}
} else {
target.trackEvent(name);
}
Expand Down

0 comments on commit 4f49c6a

Please sign in to comment.