comment creation event

This commit is contained in:
Akinwale Ariwodola 2020-06-01 08:53:58 +01:00
parent f9de0d7937
commit 2707e135c6
3 changed files with 13 additions and 2 deletions

View file

@ -6,7 +6,6 @@ import android.os.AsyncTask;
import android.os.Bundle; import android.os.Bundle;
import android.text.Editable; import android.text.Editable;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -19,7 +18,6 @@ import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.AppCompatSpinner; import androidx.appcompat.widget.AppCompatSpinner;
import androidx.core.text.HtmlCompat;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
@ -553,6 +551,12 @@ public class ChannelCommentsFragment extends Fragment implements SdkStatusListen
afterPostComment(); afterPostComment();
checkNoComments(); checkNoComments();
Bundle bundle = new Bundle();
bundle.putDouble("amount", amount.doubleValue());
bundle.putString("claim_id", claim != null ? claim.getClaimId() : null);
bundle.putString("claim_name", claim != null ? claim.getName() : null);
LbryAnalytics.logEvent(LbryAnalytics.EVENT_COMMENT_CREATE, bundle);
Context context = getContext(); Context context = getContext();
if (context instanceof MainActivity) { if (context instanceof MainActivity) {
((MainActivity) context).showMessage(R.string.comment_posted); ((MainActivity) context).showMessage(R.string.comment_posted);

View file

@ -2924,6 +2924,12 @@ public class FileViewFragment extends BaseFragment implements
afterPostComment(); afterPostComment();
checkNoComments(); checkNoComments();
Bundle bundle = new Bundle();
bundle.putDouble("amount", amount.doubleValue());
bundle.putString("claim_id", claim != null ? claim.getClaimId() : null);
bundle.putString("claim_name", claim != null ? claim.getName() : null);
LbryAnalytics.logEvent(LbryAnalytics.EVENT_COMMENT_CREATE, bundle);
Context context = getContext(); Context context = getContext();
if (context instanceof MainActivity) { if (context instanceof MainActivity) {
((MainActivity) context).showMessage(R.string.comment_posted); ((MainActivity) context).showMessage(R.string.comment_posted);

View file

@ -10,6 +10,7 @@ public class LbryAnalytics {
public static final String EVENT_APP_ERROR = "app_error"; public static final String EVENT_APP_ERROR = "app_error";
public static final String EVENT_APP_LAUNCH = "app_launch"; public static final String EVENT_APP_LAUNCH = "app_launch";
public static final String EVENT_COMMENT_CREATE = "comment_create";
public static final String EVENT_EMAIL_ADDED = "email_added"; public static final String EVENT_EMAIL_ADDED = "email_added";
public static final String EVENT_EMAIL_VERIFIED = "email_verified"; public static final String EVENT_EMAIL_VERIFIED = "email_verified";
public static final String EVENT_FIRST_RUN_COMPLETED = "first_run_completed"; public static final String EVENT_FIRST_RUN_COMPLETED = "first_run_completed";