Skip to content

Commit

Permalink
dispatcher: removed kt prefix + fix wrong property in custom event
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud-roland committed Dec 6, 2023
1 parent 784aeba commit 62f3377
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import io.piano.android.analytics.model.PropertyName
* Piano Event Dispatcher (Kotlin)
* Instantiated when running on Piano SDK 3.3.0 or newer.
*/
class KtPianoDispatcher() : AbstractPianoDispatcher() {
class PianoDispatcher() : AbstractPianoDispatcher() {

/**
* Callback fired when a new Batch event is triggered
Expand Down Expand Up @@ -65,7 +65,6 @@ class KtPianoDispatcher() : AbstractPianoDispatcher() {
): Event {
val name = getPianoEventName(type)
val data: MutableSet<Property> = mutableSetOf(
Property(PropertyName(ON_SITE_TYPE), ON_SITE_TYPE_PUBLISHER),
Property(PropertyName(SOURCE), getSource(payload)),
Property(PropertyName(CAMPAIGN), getCampaign(payload)),
Property(PropertyName(MEDIUM), getMedium(payload, type)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class PianoRegistrar implements DispatcherRegistrar {
public BatchEventDispatcher getDispatcher(Context context) {
if (instance == null) {
if (isNewPianoSDKPresent()) {
instance = new KtPianoDispatcher();
instance = new PianoDispatcher();
} else {
Log.w("Batch", "PianoDispatcher - It looks like your app is running with an old version of the Piano Analytics SDK. You should migrate on version 3.3.0 or newer.");
instance = new LegacyPianoDispatcher(context);
Expand Down

0 comments on commit 62f3377

Please sign in to comment.