Skip to content

Commit

Permalink
fix some events
Browse files Browse the repository at this point in the history
  • Loading branch information
akinwale committed May 18, 2020
1 parent d4d58d7 commit 9aaa4db
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,14 @@ public void onSuccess(Claim claimResult) {
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,10 @@ public void onResume() {

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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public void onResume() {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,12 @@ public void onSuccess(Claim claimResult) {
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);
Expand Down

0 comments on commit 9aaa4db

Please sign in to comment.