fix some events

This commit is contained in:
Akinwale Ariwodola 2020-05-18 03:57:06 +01:00
parent d4d58d7508
commit 9aaa4db5f0
4 changed files with 19 additions and 1 deletions

View file

@ -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;

View file

@ -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();

View file

@ -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);

View file

@ -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);