diff --git a/app/src/main/java/io/lbry/browser/ui/channel/ChannelCommentsFragment.java b/app/src/main/java/io/lbry/browser/ui/channel/ChannelCommentsFragment.java index 25012261..30db98aa 100644 --- a/app/src/main/java/io/lbry/browser/ui/channel/ChannelCommentsFragment.java +++ b/app/src/main/java/io/lbry/browser/ui/channel/ChannelCommentsFragment.java @@ -6,7 +6,6 @@ import android.os.AsyncTask; import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; -import android.text.method.LinkMovementMethod; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -19,7 +18,6 @@ import android.widget.TextView; import androidx.annotation.NonNull; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.widget.AppCompatSpinner; -import androidx.core.text.HtmlCompat; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; @@ -553,6 +551,12 @@ public class ChannelCommentsFragment extends Fragment implements SdkStatusListen afterPostComment(); 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(); if (context instanceof MainActivity) { ((MainActivity) context).showMessage(R.string.comment_posted); diff --git a/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java b/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java index 589efdbe..53ec5f44 100644 --- a/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java +++ b/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java @@ -2924,6 +2924,12 @@ public class FileViewFragment extends BaseFragment implements afterPostComment(); 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(); if (context instanceof MainActivity) { ((MainActivity) context).showMessage(R.string.comment_posted); diff --git a/app/src/main/java/io/lbry/browser/utils/LbryAnalytics.java b/app/src/main/java/io/lbry/browser/utils/LbryAnalytics.java index a8f446ab..17b66b69 100644 --- a/app/src/main/java/io/lbry/browser/utils/LbryAnalytics.java +++ b/app/src/main/java/io/lbry/browser/utils/LbryAnalytics.java @@ -10,6 +10,7 @@ public class LbryAnalytics { public static final String EVENT_APP_ERROR = "app_error"; 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_VERIFIED = "email_verified"; public static final String EVENT_FIRST_RUN_COMPLETED = "first_run_completed";