diff --git a/app/src/main/java/com/gh/common/util/NewLogUtils.kt b/app/src/main/java/com/gh/common/util/NewLogUtils.kt index 275bd4c4df..a76476468f 100644 --- a/app/src/main/java/com/gh/common/util/NewLogUtils.kt +++ b/app/src/main/java/com/gh/common/util/NewLogUtils.kt @@ -669,7 +669,7 @@ object NewLogUtils { val json = json { "location" to "推荐信息流" "event" to "click_for_you_badge" - "ref_user_id" to badgeId + "badge_id" to badgeId "meta" to LogUtils.getMetaObject() "launch_id" to Tracker.launchId "session_id" to Tracker.sessionId @@ -1013,8 +1013,8 @@ object NewLogUtils { //论坛详情滑动信息流内容 fun logForumDetailFeedSlide(slideContentNum: Int) { val json = json { - "location" to "论坛详情页" "event" to "slide_forum_detail_feed_content" + "location" to "论坛详情页" "slide_content_num" to slideContentNum "meta" to LogUtils.getMetaObject() "launch_id" to Tracker.launchId @@ -1023,4 +1023,50 @@ object NewLogUtils { } log(json, "bbs_community", false) } + + //进入版规说明页 + fun logForumRuleEnter(bbsId: String, bbsType: String) { + val json = json { + "event" to "view_layout_description" + "location" to "版规说明" + "bbs_id" to bbsId + "bbs_type" to bbsType + "meta" to LogUtils.getMetaObject() + "launch_id" to Tracker.launchId + "session_id" to Tracker.sessionId + "timestamp" to System.currentTimeMillis() / 1000 + } + log(json, "bbs_community", false) + } + + //进入版主成员页 + fun logForumModeratorEnter(bbsId: String, bbsType: String) { + val json = json { + "event" to "view_forum_member" + "location" to "版主成员" + "bbs_id" to bbsId + "bbs_type" to bbsType + "meta" to LogUtils.getMetaObject() + "launch_id" to Tracker.launchId + "session_id" to Tracker.sessionId + "timestamp" to System.currentTimeMillis() / 1000 + } + log(json, "bbs_community", false) + } + + //进入版主成员页 + fun logForumModeratorClick(event: String, userId: String = "") { + val json = json { + "event" to event + "location" to "版主成员" + if (userId.isNotEmpty()) { + "ref_user_id" to userId + } + "meta" to LogUtils.getMetaObject() + "launch_id" to Tracker.launchId + "session_id" to Tracker.sessionId + "timestamp" to System.currentTimeMillis() / 1000 + } + log(json, "bbs_community", false) + } } \ No newline at end of file diff --git a/app/src/main/java/com/gh/gamecenter/forum/detail/ForumArticleAskListAdapter.kt b/app/src/main/java/com/gh/gamecenter/forum/detail/ForumArticleAskListAdapter.kt index 9279a1d8b5..d5885fe719 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/detail/ForumArticleAskListAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/detail/ForumArticleAskListAdapter.kt @@ -78,7 +78,7 @@ class ForumArticleAskListAdapter(context: Context, val bbsId: String, val mEntra binding.includeVoteAndComment.root.layoutParams = params val tabInfo = "${path}tab" - answerViewHolder.bindForumAnswerItem(answer, mEntrance, path, position, tabInfo) + answerViewHolder.bindForumAnswerItem(answer, mEntrance, path, position) answerViewHolder.itemView.setOnClickListener { val entrance = BaseActivity.mergeEntranceAndPath(mEntrance, path) val userId = answer.user.id ?: "" diff --git a/app/src/main/java/com/gh/gamecenter/forum/detail/ForumDetailFragment.kt b/app/src/main/java/com/gh/gamecenter/forum/detail/ForumDetailFragment.kt index 8114f0ab60..621248d612 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/detail/ForumDetailFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/detail/ForumDetailFragment.kt @@ -215,21 +215,13 @@ class ForumDetailFragment : BaseLazyTabFragment() { if (it < mFragmentsList.size) { (mFragmentsList.safelyGetInRelease(it) as ForumArticleAskListFragment).refreshScrollHelper() } - } - mTabLayout.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener { - override fun onTabReselected(tab: TabLayout.Tab?) {} - - override fun onTabUnselected(tab: TabLayout.Tab?) {} - - override fun onTabSelected(tab: TabLayout.Tab?) { - when (tab?.position) { - 0 -> NewLogUtils.logForumDetailEnterOrClick("click_all_tab", bbsId, bbsType, "", mFilter) - 1 -> NewLogUtils.logForumDetailEnterOrClick("click_essence_tab", bbsId, bbsType) - 2 -> NewLogUtils.logForumDetailEnterOrClick("click_question_tab", bbsId, bbsType) - 3 -> NewLogUtils.logForumDetailEnterOrClick("click_video_tab", bbsId, bbsType, "", mVideoFilter) - } + when (it) { + 0 -> NewLogUtils.logForumDetailEnterOrClick("click_all_tab", bbsId, bbsType, "", mFilter) + 1 -> NewLogUtils.logForumDetailEnterOrClick("click_essence_tab", bbsId, bbsType) + 2 -> NewLogUtils.logForumDetailEnterOrClick("click_question_tab", bbsId, bbsType) + 3 -> NewLogUtils.logForumDetailEnterOrClick("click_video_tab", bbsId, bbsType, "", mVideoFilter) } - }) + } mBinding.refreshLayout.setOnRefreshListener { if (mAllForumArticleAskListFragment != null && mViewPager.currentItem == 0) { mAllForumArticleAskListFragment?.refresh() @@ -378,7 +370,8 @@ class ForumDetailFragment : BaseLazyTabFragment() { showCommunityEditWindow() } R.id.moderatorTv -> { - NewLogUtils.logForumDetailEnterOrClick("cilck_forum_member", bbsId, bbsType) + NewLogUtils.logForumDetailEnterOrClick("click_forum_member", bbsId, bbsType) + NewLogUtils.logForumModeratorEnter(bbsId, bbsType) requireContext().startActivity(ModeratorListActivity.getIntent(requireContext(), mForumDetail?.id ?: "", mForumDetail?.type ?: "", mEntrance, "论坛详情")) } @@ -387,7 +380,7 @@ class ForumDetailFragment : BaseLazyTabFragment() { mViewModel?.getForumDetail() } R.id.gameZoneTv -> { - NewLogUtils.logForumDetailEnterOrClick("cilck_strategy_zone", bbsId, bbsType) + NewLogUtils.logForumDetailEnterOrClick("click_strategy_zone", bbsId, bbsType) if (mForumDetail?.zone != null) { MtaHelper.onEvent("论坛详情", "顶部区域", "游戏专区") GameDetailActivity.startGameDetailByShortcut(requireContext(), mForumDetail?.game?.id @@ -395,7 +388,7 @@ class ForumDetailFragment : BaseLazyTabFragment() { } } R.id.forumThumbBig -> { - NewLogUtils.logForumDetailEnterOrClick("cilck_forum_detail_forum_icon", bbsId) + NewLogUtils.logForumDetailEnterOrClick("click_forum_detail_forum_icon", bbsId) MtaHelper.onEvent("论坛详情", "顶部区域", "游戏图标") if (mForumDetail?.game?.active == true) { GameDetailActivity.startGameDetailActivity(requireContext(), mForumDetail?.game?.id @@ -418,7 +411,7 @@ class ForumDetailFragment : BaseLazyTabFragment() { } else { mViewModel?.followForum { val userId = UserManager.getInstance().userId - NewLogUtils.logForumDetailEnterOrClick("cilck_forum_detail_follow", bbsId, bbsType, userId) + NewLogUtils.logForumDetailEnterOrClick("click_forum_detail_follow", bbsId, bbsType, userId) MtaHelper.onEvent("论坛详情", "顶部区域", "关注") mForumDetail?.me?.isFollower = true ToastUtils.showToast("关注成功") @@ -431,7 +424,8 @@ class ForumDetailFragment : BaseLazyTabFragment() { } R.id.forumRuleContainer -> { - NewLogUtils.logForumDetailEnterOrClick("cilck_layout_describtion",bbsId, bbsType) + NewLogUtils.logForumDetailEnterOrClick("click_layout_description", bbsId, bbsType) + NewLogUtils.logForumRuleEnter(bbsId, bbsType) startActivity(NewsDetailActivity.getIntentById(requireContext(), Constants.FORUM_REGULATIONS_NEWS_ID, "论坛详情")) } } @@ -629,6 +623,7 @@ class ForumDetailFragment : BaseLazyTabFragment() { } override fun onBackPressed(): Boolean { + NewLogUtils.logForumDetailEnterOrClick("click_forum_detail_return", bbsId, bbsType) return (mFragmentsList[mBinding.fragmentViewPager.currentItem] as ForumArticleAskListFragment).onBackPressed() } diff --git a/app/src/main/java/com/gh/gamecenter/forum/detail/ForumTopLinkAdapter.kt b/app/src/main/java/com/gh/gamecenter/forum/detail/ForumTopLinkAdapter.kt index 15e4c07dc3..841bacda06 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/detail/ForumTopLinkAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/detail/ForumTopLinkAdapter.kt @@ -27,7 +27,7 @@ class ForumTopLinkAdapter(context: Context, val links: ArrayList, va MtaHelper.onEvent("论坛详情", "论坛置顶", linkEntity.text) DirectUtils.directToLinkPage(mContext, linkEntity, "论坛详情", "") val bbsType = if (bbsType == "game_bbs") "游戏论坛" else "综合论坛" - NewLogUtils.logForumDetailEnterOrClick("cilck_top_content", bbsId, bbsType) + NewLogUtils.logForumDetailEnterOrClick("click_top_content", bbsId, bbsType) NewLogUtils.logForumLinkTopClick(bbsId, bbsType) } if (position == 0) { diff --git a/app/src/main/java/com/gh/gamecenter/forum/home/CommunityHomeFragment.kt b/app/src/main/java/com/gh/gamecenter/forum/home/CommunityHomeFragment.kt index a16123138a..32a94c8498 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/home/CommunityHomeFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/home/CommunityHomeFragment.kt @@ -128,6 +128,11 @@ class CommunityHomeFragment : LazyFragment() { onPageSelected = { position -> updateTabTextStyle(position, 0F) mBinding?.communityEditBtn?.goneIf(position != 0) + when (position) { + 0 -> NewLogUtils.logCommunityHomeEvent("click_for_you_tab") + 1 -> NewLogUtils.logCommunityHomeEvent("click_forum_tab") + 2 -> NewLogUtils.logCommunityHomeEvent("click_activity_tab") + } }, onPageScrolled = { position, positionOffset, _ -> if (position + 1 != mTabList.size) { @@ -156,20 +161,6 @@ class CommunityHomeFragment : LazyFragment() { ) } - tabLayout.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener { - override fun onTabReselected(tab: TabLayout.Tab?) {} - - override fun onTabUnselected(tab: TabLayout.Tab?) {} - - override fun onTabSelected(tab: TabLayout.Tab?) { - when (tab?.position) { - 0 -> NewLogUtils.logCommunityHomeEvent("click_for_you_tab") - 1 -> NewLogUtils.logCommunityHomeEvent("click_forum_tab") - 2 -> NewLogUtils.logCommunityHomeEvent("click_activity_tab") - } - } - }) - tabLayout.setupWithViewPager(viewPager) indicatorView.run { setupWithTabLayout(tabLayout) diff --git a/app/src/main/java/com/gh/gamecenter/forum/home/ForumActivityAdapter.kt b/app/src/main/java/com/gh/gamecenter/forum/home/ForumActivityAdapter.kt index 927328484b..533c9aa95b 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/home/ForumActivityAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/home/ForumActivityAdapter.kt @@ -119,7 +119,8 @@ class ForumActivityAdapter(context: Context, } root.setOnClickListener { - NewLogUtils.logForumActivityClick(mViewModel.categoryId, activityEntity.id) + val categoryId = if (mViewModel.categoryId.isEmpty()) "all" else mViewModel.categoryId + NewLogUtils.logForumActivityClick(categoryId, activityEntity.id) if (status == "未开始") ToastUtils.toast("别着急,活动快开始咯") if (status == "正在评奖") ToastUtils.toast("活动正在评奖中") if (status == "奖励发放中") ToastUtils.toast("活动奖励发放中~") diff --git a/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleAskItemViewHolder.kt b/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleAskItemViewHolder.kt index 2b2b6896b9..a03ef08793 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleAskItemViewHolder.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleAskItemViewHolder.kt @@ -27,9 +27,9 @@ import com.shuyu.gsyvideoplayer.utils.OrientationUtils class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : BaseAnswerOrArticleItemViewHolder(binding.root) { - fun bindForumAnswerItem(entity: AnswerEntity, entrance: String, path: String, position: Int? = null, tabInfo: String? = null) { - bindItem(entity, entrance, path, tabInfo) - bindCommendAndVote(entity, BaseActivity.mergeEntranceAndPath(entrance, path), position, tabInfo) + fun bindForumAnswerItem(entity: AnswerEntity, entrance: String, path: String, position: Int? = null) { + bindItem(entity, entrance, path) + bindCommendAndVote(entity, BaseActivity.mergeEntranceAndPath(entrance, path), path, position) } fun bindForumArticleItem(entity: ArticleEntity, entrance: String, path: String, position: Int) { @@ -37,7 +37,7 @@ class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : B bindCommendAndVote(entity, BaseActivity.mergeEntranceAndPath(entrance, path), position) } - private fun bindItem(entity: AnswerEntity, entrance: String, path: String, tabInfo: String? = null) { + private fun bindItem(entity: AnswerEntity, entrance: String, path: String) { binding.entity = entity binding.executePendingBindings() @@ -89,7 +89,7 @@ class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : B if (entrance == "社区") { NewLogUtils.logRecommendFeedBadgeClick(user.badge?.name ?: "") } - if (entrance == "论坛详情" && tabInfo != null) { + if (entrance == "论坛详情") { NewLogUtils.logForumDetailFeedBadgeClick(user.badge?.name ?: "", bbsId, bbsType) } DialogUtils.showViewBadgeDialog(binding.root.context, user.badge) { @@ -103,8 +103,8 @@ class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : B if (entrance == "社区") { NewLogUtils.logRecommendFeedUserClick("click_for_you_profile_photo", userId, contentType) } - if (entrance == "论坛详情" && tabInfo != null) { - NewLogUtils.logForumDetailFeedUserClick("click_forum_detail_profile_photo", userId, contentType, tabInfo, bbsId, bbsType) + if (entrance == "论坛详情") { + NewLogUtils.logForumDetailFeedUserClick("click_forum_detail_profile_photo", userId, contentType, "${path}tab", bbsId, bbsType) } MtaHelper.onEvent(getEventId(BaseActivity.mergeEntranceAndPath(entrance, path)), getKey(BaseActivity.mergeEntranceAndPath(entrance, path)), "用户头像") DirectUtils.directToHomeActivity(binding.root.context, entity.user.id, 1, entrance, path) @@ -113,8 +113,8 @@ class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : B if (entrance == "社区") { NewLogUtils.logRecommendFeedUserClick("click_for_you_nickname", userId, contentType) } - if (entrance == "论坛详情" && tabInfo != null) { - NewLogUtils.logForumDetailFeedUserClick("click_forum_detail_nickname", userId, contentType, tabInfo, bbsId, bbsType) + if (entrance == "论坛详情") { + NewLogUtils.logForumDetailFeedUserClick("click_forum_detail_nickname", userId, contentType, "${path}tab", bbsId, bbsType) } MtaHelper.onEvent(getEventId(BaseActivity.mergeEntranceAndPath(entrance, path)), getKey(BaseActivity.mergeEntranceAndPath(entrance, path)), "用户名字") DirectUtils.directToHomeActivity(binding.root.context, entity.user.id, 1, entrance, path) @@ -128,8 +128,8 @@ class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : B if (entrance == "论坛首页+(搜索)") { NewLogUtils.logForumSearchFollowClick("关注用户", bbsId, bbsType, userId) } - if (entrance == "论坛详情" && tabInfo != null) { - NewLogUtils.logForumDetailFeedUserClick("click_forum_detail_follow", userId, contentType, tabInfo, bbsId, bbsType) + if (entrance == "论坛详情") { + NewLogUtils.logForumDetailFeedUserClick("click_forum_detail_follow", userId, contentType, "${path}tab", bbsId, bbsType) } followUser(entity, object : EmptyCallback { override fun onCallback() { @@ -209,7 +209,7 @@ class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : B } } - override fun bindCommendAndVote(entity: AnswerEntity, entrance: String, position: Int?, tabInfo: String?) { + override fun bindCommendAndVote(entity: AnswerEntity, entrance: String, path: String?, position: Int?) { if (entity.type != "question") { binNormalView(entity) } else { @@ -241,15 +241,10 @@ class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : B commentCountContainer.setOnClickListener { if (filterIllegalCommentStatus(entity.commentable, entity.active)) return@setOnClickListener - if (entrance == "论坛详情" && position != null && tabInfo != null) { + if (entrance.contains("论坛详情") && position != null) { entity.run { val userId = entity.user.id ?: "" val contentId = entity.id ?: "" - val commentType = when (entity.type) { - "community_article" -> "帖子评论" - "video" -> "视频帖评论" - else -> "提问帖评论" - } val contentType = when (entity.type) { "community_article" -> "帖子" "video" -> "视频帖" @@ -259,6 +254,12 @@ class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : B val sequence = position + 1 val bbsId = entity.bbs.id val bbsType = if (entity.bbs.type == "official_bbs") "综合论坛" else "游戏论坛" + val tabInfo = "${path}tab" + val commentType = when (entity.type) { + "community_article" -> "帖子评论" + "video" -> "视频帖评论" + else -> "提问帖评论" + } NewLogUtils.logForumDetailFeedContentClick("click_forum_detail_comment", userId, contentId, contentType, sequence, bbsId, bbsType, tabInfo, commentType) } } @@ -293,7 +294,7 @@ class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : B debounceActionWithInterval(R.id.container_like, 1000) { CheckLoginUtils.checkLogin(itemView.context, entrance) { - if (entrance == "论坛详情" && position != null && tabInfo != null) { + if (entrance.contains("论坛详情") && position != null) { entity.run { val userId = entity.user.id ?: "" val contentId = entity.id ?: "" @@ -306,6 +307,7 @@ class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : B val sequence = position + 1 val bbsId = entity.bbs.id val bbsType = if (entity.bbs.type == "official_bbs") "综合论坛" else "游戏论坛" + val tabInfo = "${path}tab" NewLogUtils.logForumDetailFeedContentClick("click_forum_detail_like", userId, contentId, contentType, sequence, bbsId, bbsType, tabInfo) } } diff --git a/app/src/main/java/com/gh/gamecenter/forum/list/ForumListActivity.kt b/app/src/main/java/com/gh/gamecenter/forum/list/ForumListActivity.kt index b0b1717537..bb19f73862 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/list/ForumListActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/list/ForumListActivity.kt @@ -3,40 +3,11 @@ package com.gh.gamecenter.forum.list import android.content.Context import android.content.Intent import android.os.Bundle -import android.view.View import com.gh.common.util.EntranceUtils -import com.gh.common.util.NewLogUtils import com.gh.gamecenter.NormalActivity class ForumListActivity : NormalActivity() { - override fun provideNavigationItemClickListener() = View.OnClickListener { - val bundle = intent.getBundleExtra(NORMAL_FRAGMENT_BUNDLE) - bundle?.run { - var event = "" - var location = "" - when (getString(EntranceUtils.KEY_TYPE)) { - TYPE_FOLLOW -> { - event = "click_followforum_return" - location = "关注论坛页" - } - - TYPE_HOT -> { - event = "click_hotforum_return" - location = "热门论坛页" - } - - TYPE_OFFICIAL -> { - event = "click_multipleforum_return" - location = "综合论坛页" - } - } - NewLogUtils.logForumPageEnterOrReturnClick(event, location) - } - - onBackPressed() - } - companion object { const val TYPE_FOLLOW = "follow" const val TYPE_HOT = "hot" diff --git a/app/src/main/java/com/gh/gamecenter/forum/list/ForumListFragment.kt b/app/src/main/java/com/gh/gamecenter/forum/list/ForumListFragment.kt index c989ff5952..da72296a71 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/list/ForumListFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/list/ForumListFragment.kt @@ -1,12 +1,8 @@ package com.gh.gamecenter.forum.list import android.os.Bundle -import com.gh.common.util.EntranceUtils -import com.gh.common.util.dip2px -import com.gh.common.util.toColor -import com.gh.common.util.viewModelProvider +import com.gh.common.util.* import com.gh.common.view.SpacingItemDecoration -import com.gh.gamecenter.R import com.gh.gamecenter.baselist.ListFragment import com.gh.gamecenter.entity.ForumEntity @@ -38,4 +34,27 @@ class ForumListFragment: ListFragment() { super.onCreate(savedInstanceState) } + + override fun onBackPressed(): Boolean { + var event = "" + var location = "" + when (mViewModel?.type) { + ForumListActivity.TYPE_FOLLOW -> { + event = "click_followforum_return" + location = "关注论坛页" + } + + ForumListActivity.TYPE_HOT -> { + event = "click_hotforum_return" + location = "热门论坛页" + } + + ForumListActivity.TYPE_OFFICIAL -> { + event = "click_multipleforum_return" + location = "综合论坛页" + } + } + NewLogUtils.logForumPageEnterOrReturnClick(event, location) + return super.onBackPressed() + } } \ No newline at end of file diff --git a/app/src/main/java/com/gh/gamecenter/qa/answer/BaseAnswerOrArticleItemViewHolder.kt b/app/src/main/java/com/gh/gamecenter/qa/answer/BaseAnswerOrArticleItemViewHolder.kt index 4426c2164e..f80ce2c016 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/answer/BaseAnswerOrArticleItemViewHolder.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/answer/BaseAnswerOrArticleItemViewHolder.kt @@ -47,7 +47,7 @@ open class BaseAnswerOrArticleItemViewHolder(itemView: View) : BaseRecyclerViewH val forumIcon: GameIconView? = itemView.findViewById(R.id.forumIcon) - open fun bindCommendAndVote(entity: AnswerEntity, entrance: String, position: Int? = null, tabInfo: String? = null) { + open fun bindCommendAndVote(entity: AnswerEntity, entrance: String, path: String? = null, position: Int? = null) { binNormalView(entity) commentCountContainer.setOnClickListener { @@ -130,7 +130,7 @@ open class BaseAnswerOrArticleItemViewHolder(itemView: View) : BaseRecyclerViewH val bbsType = if (entity.bbs.type == "official_bbs") "综合论坛" else "游戏论坛" forumNameTv.setOnClickListener { - if (entrance == "社区") { + if (entrance == "社区+(推荐)") { NewLogUtils.logRecommendFeedForumClick(contentType, entity.id, entity.bbs.id, bbsType) } @@ -146,7 +146,7 @@ open class BaseAnswerOrArticleItemViewHolder(itemView: View) : BaseRecyclerViewH commentCountContainer.setOnClickListener { if (filterIllegalCommentStatus(entity.commentable, entity.active)) return@setOnClickListener - if (entrance == "社区" && position != null) { + if (entrance == "社区+(推荐)" && position != null) { entity.run { val commentType = when (entity.type) { "community_article" -> "帖子评论" @@ -187,7 +187,7 @@ open class BaseAnswerOrArticleItemViewHolder(itemView: View) : BaseRecyclerViewH debounceActionWithInterval(R.id.container_like, 1000) { CheckLoginUtils.checkLogin(itemView.context, entrance) { - if (entrance == "社区" && position != null) { + if (entrance == "社区+(推荐)" && position != null) { entity.run { NewLogUtils.logRecommendFeedContentClick("click_for_you_like", contentType, id, position + 1, bbs.id, bbsType, user.id ?: "") }