From 9aaa4db5f012fdb13b658c941a4c51fce850a8a5 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Mon, 18 May 2020 03:57:06 +0100 Subject: [PATCH] fix some events --- .../io/lbry/browser/ui/channel/ChannelFormFragment.java | 8 ++++++++ .../io/lbry/browser/ui/following/FileViewFragment.java | 4 ++++ .../main/java/io/lbry/browser/ui/other/AboutFragment.java | 2 +- .../java/io/lbry/browser/ui/wallet/InvitesFragment.java | 6 ++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/lbry/browser/ui/channel/ChannelFormFragment.java b/app/src/main/java/io/lbry/browser/ui/channel/ChannelFormFragment.java index 6a3cc146..721e8991 100644 --- a/app/src/main/java/io/lbry/browser/ui/channel/ChannelFormFragment.java +++ b/app/src/main/java/io/lbry/browser/ui/channel/ChannelFormFragment.java @@ -328,6 +328,14 @@ public class ChannelFormFragment extends BaseFragment implements logPublish.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } + if (!editMode) { + // channel created + Bundle bundle = new Bundle(); + bundle.putString("claim_id", claimResult.getClaimId()); + bundle.putString("claim_name", claimResult.getName()); + LbryAnalytics.logEvent(LbryAnalytics.EVENT_CHANNEL_CREATE, bundle); + } + Context context = getContext(); if (context instanceof MainActivity) { MainActivity activity = (MainActivity) context; diff --git a/app/src/main/java/io/lbry/browser/ui/following/FileViewFragment.java b/app/src/main/java/io/lbry/browser/ui/following/FileViewFragment.java index 9a00d2e3..9b06b794 100644 --- a/app/src/main/java/io/lbry/browser/ui/following/FileViewFragment.java +++ b/app/src/main/java/io/lbry/browser/ui/following/FileViewFragment.java @@ -479,6 +479,10 @@ public class FileViewFragment extends BaseFragment implements Context context = getContext(); Helper.setWunderbarValue(currentUrl, context); + if (context instanceof MainActivity) { + LbryAnalytics.setCurrentScreen((MainActivity) context, "File", "File"); + } + if (MainActivity.appPlayer != null) { if (MainActivity.playerReassigned) { setPlayerForPlayerView(); diff --git a/app/src/main/java/io/lbry/browser/ui/other/AboutFragment.java b/app/src/main/java/io/lbry/browser/ui/other/AboutFragment.java index bf7e7537..0923ad1b 100644 --- a/app/src/main/java/io/lbry/browser/ui/other/AboutFragment.java +++ b/app/src/main/java/io/lbry/browser/ui/other/AboutFragment.java @@ -193,7 +193,7 @@ public class AboutFragment extends BaseFragment implements SdkStatusListener { Context context = getContext(); if (context instanceof MainActivity) { MainActivity activity = (MainActivity) context; - LbryAnalytics.setCurrentScreen(activity, "Settings", "Settings"); + LbryAnalytics.setCurrentScreen(activity, "About", "About"); if (!Lbry.SDK_READY) { activity.addSdkStatusListener(this); diff --git a/app/src/main/java/io/lbry/browser/ui/wallet/InvitesFragment.java b/app/src/main/java/io/lbry/browser/ui/wallet/InvitesFragment.java index 3d0ac7fa..1a0656eb 100644 --- a/app/src/main/java/io/lbry/browser/ui/wallet/InvitesFragment.java +++ b/app/src/main/java/io/lbry/browser/ui/wallet/InvitesFragment.java @@ -526,6 +526,12 @@ public class InvitesFragment extends BaseFragment implements SdkStatusListener, logPublishTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } + // channel created + Bundle bundle = new Bundle(); + bundle.putString("claim_id", claimResult.getClaimId()); + bundle.putString("claim_name", claimResult.getName()); + LbryAnalytics.logEvent(LbryAnalytics.EVENT_CHANNEL_CREATE, bundle); + // add the claim to the channel list and set it as the selected item channelSpinnerAdapter.add(claimResult); channelSpinner.setSelection(channelSpinnerAdapter.getCount() - 1);