Merge branch 'feat/GHZSCY-6464' into 'dev'
feat: 多渠道多版本管理 新增“我的光环”—客户端 https://jira.shanqu.cc/browse/GHZSCY-6464 See merge request halo/android/assistant-android!1822
This commit is contained in:
@ -72,7 +72,6 @@ android_build:
|
||||
only:
|
||||
- dev
|
||||
- release
|
||||
- feat/GHZSCY-6651
|
||||
|
||||
# 代码检查
|
||||
sonarqube_analysis:
|
||||
@ -157,5 +156,4 @@ oss-upload&send-email:
|
||||
- /usr/local/bin/python /ci-android-mail-jira-comment.py
|
||||
only:
|
||||
- dev
|
||||
- release
|
||||
- feat/GHZSCY-6651
|
||||
- release
|
||||
@ -74,6 +74,13 @@ class HaloPersonalBannerAdapter(context: Context) : BaseRecyclerAdapter<Recycler
|
||||
ImageUtils.display(binding.bannerIv, entity.icon)
|
||||
binding.root.setOnClickListener {
|
||||
NewFlatLogUtils.logHaloSelfClick("活动位", entity.link?.text ?: "")
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "活动位",
|
||||
text = entity.link?.text ?: "",
|
||||
linkType = entity.link?.type ?: "",
|
||||
linkId = entity.link?.link ?: "",
|
||||
linkText = entity.link?.text ?: ""
|
||||
)
|
||||
NewFlatLogUtils.logHaloPersonalActivityBannerClick(
|
||||
entity.link?.link ?: "",
|
||||
entity.link?.type ?: "",
|
||||
|
||||
@ -133,6 +133,8 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
mStubBinding.motionLayout -> {
|
||||
if (mUserInfoEntity == null) {
|
||||
NewFlatLogUtils.logHaloSelfLogin()
|
||||
NewFlatLogUtils.logHaloSelfClick("用户信息", "立即登录")
|
||||
SensorsBridge.trackHaloSelfClick("用户信息", "立即登录", "", "", "")
|
||||
CheckLoginUtils.checkLogin(context, "我的光环-立即登录", null)
|
||||
} else {
|
||||
mStubBinding.ivArrow.performClick()
|
||||
@ -147,6 +149,13 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
mStubBinding.darkModeIv -> {
|
||||
if (!ClickUtils.isFastDoubleClick(v.id, 1000)) {
|
||||
NewFlatLogUtils.logHaloSelfClick("右上角", "切换模式")
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "右上角",
|
||||
text = "切换模式",
|
||||
linkType = "",
|
||||
linkId = "",
|
||||
linkText = ""
|
||||
)
|
||||
if (DarkModeUtils.isFollowSystemDarkModeFromSp()) {
|
||||
DialogHelper.showDialog(
|
||||
context = requireContext(),
|
||||
@ -176,6 +185,13 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
mStubBinding.personalMsg -> {
|
||||
if (CheckLoginUtils.isLogin()) {
|
||||
NewFlatLogUtils.logHaloSelfClick("右上角", "消息中心")
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "右上角",
|
||||
text = "消息中心",
|
||||
linkType = "",
|
||||
linkId = "",
|
||||
linkText = ""
|
||||
)
|
||||
NewLogUtils.logMessageInformBellClick(
|
||||
mStubBinding.loginMessageHint.visibility == View.VISIBLE,
|
||||
"我的"
|
||||
@ -195,6 +211,8 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
mStubBinding.personalUserIcon,
|
||||
mStubBinding.personalUserName -> {
|
||||
if (mUserInfoEntity != null) {
|
||||
NewFlatLogUtils.logHaloSelfClick("用户信息", "个人主页")
|
||||
SensorsBridge.trackHaloSelfClick("用户信息", "个人主页", "", "", "")
|
||||
DirectUtils.directToHomeActivity(
|
||||
requireContext(),
|
||||
UserManager.getInstance().userId,
|
||||
@ -203,11 +221,15 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
)
|
||||
} else {
|
||||
NewFlatLogUtils.logHaloSelfLogin()
|
||||
NewFlatLogUtils.logHaloSelfClick("用户信息", "立即登录")
|
||||
SensorsBridge.trackHaloSelfClick("用户信息", "立即登录", "", "", "")
|
||||
CheckLoginUtils.checkLogin(context, "我的光环-立即登录", null)
|
||||
}
|
||||
}
|
||||
mStubBinding.ivArrow -> {
|
||||
if (mUserInfoEntity != null) {
|
||||
NewFlatLogUtils.logHaloSelfClick("用户信息", "个人主页")
|
||||
SensorsBridge.trackHaloSelfClick("用户信息", "个人主页", "", "", "")
|
||||
DirectUtils.directToHomeActivity(
|
||||
requireContext(),
|
||||
UserManager.getInstance().userId,
|
||||
@ -215,10 +237,14 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
"我的光环"
|
||||
)
|
||||
} else {
|
||||
NewFlatLogUtils.logHaloSelfClick("用户信息", "立即登录")
|
||||
SensorsBridge.trackHaloSelfClick("用户信息", "立即登录", "", "", "")
|
||||
CheckLoginUtils.checkLogin(context, "我的光环-个人主页", null)
|
||||
}
|
||||
}
|
||||
mStubBinding.personalBadge -> {
|
||||
NewFlatLogUtils.logHaloSelfClick("用户信息", "我的徽章")
|
||||
SensorsBridge.trackHaloSelfClick("用户信息", "我的徽章", "", "", "")
|
||||
DirectUtils.directToBadgeWall(
|
||||
requireContext(),
|
||||
mUserInfoEntity?.userId,
|
||||
@ -229,6 +255,13 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
mStubBinding.myGameTv -> {
|
||||
if (UserManager.getInstance().isLoggedIn) {
|
||||
NewFlatLogUtils.logHaloSelfClick("常用功能", "我的游戏")
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "常用功能",
|
||||
text = "我的游戏",
|
||||
linkType = "",
|
||||
linkId = "",
|
||||
linkText = ""
|
||||
)
|
||||
startActivity(Intent(requireContext(), MyGameActivity::class.java))
|
||||
} else {
|
||||
NewFlatLogUtils.logHaloSelfLogin()
|
||||
@ -238,6 +271,13 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
mStubBinding.myPostTv -> {
|
||||
if (UserManager.getInstance().isLoggedIn) {
|
||||
NewFlatLogUtils.logHaloSelfClick("常用功能", "我的发布")
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "常用功能",
|
||||
text = "我的发布",
|
||||
linkType = "",
|
||||
linkId = "",
|
||||
linkText = ""
|
||||
)
|
||||
startActivity(MyPostActivity.getIntent(requireContext(), "我的光环-我的发布"))
|
||||
} else {
|
||||
NewFlatLogUtils.logHaloSelfLogin()
|
||||
@ -247,6 +287,13 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
mStubBinding.myGameCollectionTv -> {
|
||||
if (UserManager.getInstance().isLoggedIn) {
|
||||
NewFlatLogUtils.logHaloSelfClick("常用功能", "我的游戏单")
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "常用功能",
|
||||
text = "我的游戏单",
|
||||
linkType = "",
|
||||
linkId = "",
|
||||
linkText = ""
|
||||
)
|
||||
startActivity(MyGameCollectionActivity.getIntent(requireContext()))
|
||||
} else {
|
||||
NewFlatLogUtils.logHaloSelfLogin()
|
||||
@ -255,11 +302,25 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
}
|
||||
mStubBinding.historyTv -> {
|
||||
NewFlatLogUtils.logHaloSelfClick("常用功能", "浏览记录")
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "常用功能",
|
||||
text = "浏览记录",
|
||||
linkType = "",
|
||||
linkId = "",
|
||||
linkText = ""
|
||||
)
|
||||
startActivity(HistoryActivity.getHistoryIntent(requireContext(), "我的光环-浏览记录"))
|
||||
}
|
||||
mStubBinding.myCollectionTv -> {
|
||||
if (UserManager.getInstance().isLoggedIn) {
|
||||
NewFlatLogUtils.logHaloSelfClick("常用功能", "我的收藏")
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "常用功能",
|
||||
text = "我的收藏",
|
||||
linkType = "",
|
||||
linkId = "",
|
||||
linkText = ""
|
||||
)
|
||||
if ((MessageUnreadRepository.addonsUnread.value?.favorite ?: 0) > 0) {
|
||||
MessageUnreadRepository.refreshUnreadCount(MessageUnreadRepository.UnreadMessageType.FAVORITE)
|
||||
}
|
||||
@ -479,6 +540,13 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
.subscribe {
|
||||
if (CheckLoginUtils.isLogin()) {
|
||||
NewFlatLogUtils.logHaloSelfClick("右上角", "签到")
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "右上角",
|
||||
text = "签到",
|
||||
linkType = "",
|
||||
linkId = "",
|
||||
linkText = ""
|
||||
)
|
||||
sign()
|
||||
} else {
|
||||
NewFlatLogUtils.logHaloSelfLogin()
|
||||
@ -707,6 +775,13 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
iconIv.setImageResource(R.drawable.ic_personal_setting)
|
||||
root.setOnClickListener {
|
||||
NewFlatLogUtils.logHaloSelfClick("其他功能", "设置")
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "其他功能",
|
||||
text = "设置",
|
||||
linkType = "",
|
||||
linkId = "",
|
||||
linkText = ""
|
||||
)
|
||||
startActivity(SettingBridge.getSettingIntent(requireContext(), mIsUpdate, "我的光环"))
|
||||
}
|
||||
}
|
||||
@ -715,6 +790,13 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
iconIv.setImageResource(R.drawable.ic_personal_feedback)
|
||||
root.setOnClickListener {
|
||||
NewFlatLogUtils.logHaloSelfClick("其他功能", "帮助与反馈")
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "其他功能",
|
||||
text = "帮助与反馈",
|
||||
linkType = "",
|
||||
linkId = "",
|
||||
linkText = ""
|
||||
)
|
||||
DirectUtils.directToHelpAndFeedback(requireContext(), bundleOf(EntranceConsts.KEY_ENTRANCE to "我的光环"))
|
||||
}
|
||||
// 港澳台APP不显示帮助与反馈
|
||||
@ -725,6 +807,13 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
iconIv.setImageResource(R.drawable.ic_personal_share)
|
||||
root.setOnClickListener {
|
||||
NewFlatLogUtils.logHaloSelfClick("其他功能", "分享光环")
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "其他功能",
|
||||
text = "分享光环",
|
||||
linkType = "",
|
||||
linkId = "",
|
||||
linkText = ""
|
||||
)
|
||||
startActivity(ShareGhActivity.getIntent(requireContext()))
|
||||
}
|
||||
// 港澳台APP不显示分享光环
|
||||
@ -735,6 +824,13 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
iconIv.setImageResource(R.drawable.ic_personal_user_protocol)
|
||||
root.setOnClickListener {
|
||||
NewFlatLogUtils.logHaloSelfClick("其他功能", getString(R.string.setting_user_protocol))
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "其他功能",
|
||||
text = getString(R.string.setting_user_protocol),
|
||||
linkType = "",
|
||||
linkId = "",
|
||||
linkText = ""
|
||||
)
|
||||
startActivity(
|
||||
WebActivity.getWebIntent(
|
||||
requireContext(),
|
||||
@ -751,6 +847,13 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
mStubBinding.privacyPolicyItem.redDot.visibility = if (checkPrivacyIsSame()) View.GONE else View.VISIBLE
|
||||
root.setOnClickListener {
|
||||
NewFlatLogUtils.logHaloSelfClick("其他功能", getString(R.string.setting_privacy_policy))
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "其他功能",
|
||||
text = getString(R.string.setting_privacy_policy),
|
||||
linkType = "",
|
||||
linkId = "",
|
||||
linkText = ""
|
||||
)
|
||||
SPUtils.setString(
|
||||
Constants.SP_PRIVACY_MD5,
|
||||
SPUtils.getString(Constants.SP_PRIVACY_CURRENT_MD5)
|
||||
@ -770,6 +873,13 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
iconIv.setImageResource(R.drawable.ic_personal_info_list)
|
||||
root.setOnClickListener {
|
||||
NewFlatLogUtils.logHaloSelfClick("其他功能", getString(R.string.setting_info_list))
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "其他功能",
|
||||
text = getString(R.string.setting_info_list),
|
||||
linkType = "",
|
||||
linkId = "",
|
||||
linkText = ""
|
||||
)
|
||||
startActivity(
|
||||
WebActivity.getWebIntent(
|
||||
requireContext(),
|
||||
@ -784,6 +894,13 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
iconIv.setImageResource(R.drawable.ic_personal_sdk)
|
||||
root.setOnClickListener {
|
||||
NewFlatLogUtils.logHaloSelfClick("其他功能", getString(R.string.setting_sdk_list))
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "其他功能",
|
||||
text = getString(R.string.setting_sdk_list),
|
||||
linkType = "",
|
||||
linkId = "",
|
||||
linkText = ""
|
||||
)
|
||||
startActivity(
|
||||
WebActivity.getWebIntent(
|
||||
requireContext(),
|
||||
@ -798,6 +915,13 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
iconIv.setImageResource(R.drawable.ic_personal_permission)
|
||||
root.setOnClickListener {
|
||||
NewFlatLogUtils.logHaloSelfClick("其他功能", getString(R.string.setting_permission_and_usage))
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "其他功能",
|
||||
text = getString(R.string.setting_permission_and_usage),
|
||||
linkType = "",
|
||||
linkId = "",
|
||||
linkText = ""
|
||||
)
|
||||
startActivity(
|
||||
WebActivity.getWebIntent(
|
||||
requireContext(),
|
||||
@ -812,6 +936,13 @@ class HaloPersonalFragment : BaseLazyFragment() {
|
||||
iconIv.setImageResource(R.drawable.ic_personal_children_policy)
|
||||
root.setOnClickListener {
|
||||
NewFlatLogUtils.logHaloSelfClick("其他功能", getString(R.string.setting_children_policy))
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "其他功能",
|
||||
text = getString(R.string.setting_children_policy),
|
||||
linkType = "",
|
||||
linkId = "",
|
||||
linkText = ""
|
||||
)
|
||||
startActivity(
|
||||
WebActivity.getWebIntent(
|
||||
requireContext(),
|
||||
|
||||
@ -61,6 +61,13 @@ class HaloPersonalFunctionAdapter(context: Context) : BaseRecyclerAdapter<Recycl
|
||||
|
||||
root.setOnClickListener {
|
||||
NewFlatLogUtils.logHaloSelfClick("更多功能", linkEntity.name)
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "更多功能",
|
||||
text = linkEntity.name,
|
||||
linkType = linkEntity.link?.type ?: "",
|
||||
linkId = linkEntity.link?.link ?: "",
|
||||
linkText = linkEntity.link?.text ?: ""
|
||||
)
|
||||
directPage(linkEntity)
|
||||
}
|
||||
}
|
||||
|
||||
@ -90,6 +90,13 @@ class HaloPersonalRecommendAdapter(val context: Context) : BaseRecyclerAdapter<R
|
||||
|
||||
holder.binding.root.setOnClickListener {
|
||||
NewFlatLogUtils.logHaloSelfClick("推荐位", addonLinkEntity.name)
|
||||
SensorsBridge.trackHaloSelfClick(
|
||||
profile = "推荐位",
|
||||
text = addonLinkEntity.name,
|
||||
linkType = addonLinkEntity.link?.type ?: "",
|
||||
linkId = addonLinkEntity.link?.link ?: "",
|
||||
linkText = addonLinkEntity.link?.text ?: ""
|
||||
)
|
||||
if (addonLinkEntity.remind) {
|
||||
val haveReadRecord: HashSet<String> =
|
||||
SPUtils.getStringSet(Constants.SP_ADDONS_RECOMMEND_HAVE_READ) as HashSet<String>
|
||||
|
||||
@ -57,8 +57,6 @@ object SensorsBridge {
|
||||
private const val KEY_SOURCE_ENTRANCE = "source_entrance"
|
||||
private const val KEY_SOURCE = "source"
|
||||
private const val KEY_SEARCH_CONTENT = "search_content"
|
||||
private const val KEY_WECHAT_GAME_ID = "wechat_game_id"
|
||||
private const val KEY_WECHAT_GAME_NAME = "wechat_game_name"
|
||||
private const val KEY_SEARCH_TYPE = "search_type"
|
||||
private const val KEY_SEARCH_RESULT = "search_result"
|
||||
private const val KEY_IS_NOT_PROMPT = "is_not_prompt"
|
||||
@ -122,6 +120,7 @@ object SensorsBridge {
|
||||
private const val KEY_DOWNLOAD_TASK_STATUS = "download_task_status"
|
||||
private const val KEY_CONTENT_ID = "content_id"
|
||||
private const val KEY_CONTENT_NAME = "content_name"
|
||||
private const val KEY_PROFILE = "profile"
|
||||
|
||||
private const val EVENT_GAME_DETAIL_PAGE_TAB_SELECT = "GameDetailPageTabSelect"
|
||||
private const val EVENT_GAME_DETAIL_PAGE_TAG_CLICK = "GameDetailPageGameTagClick"
|
||||
@ -286,8 +285,8 @@ object SensorsBridge {
|
||||
private const val EVENT_DOWNLOAD_SUSPENDED_WINDOW_GUIDE_SHOW = "DownloadSuspendedWindowGuideShow"
|
||||
private const val EVENT_DOWNLOAD_SUSPENDED_WINDOW_GUIDE_CLICK = "DownloadSuspendedWindowGuideClick"
|
||||
private const val EVENT_DOWNLOAD_SUSPENDED_WINDOW_RESULT_RETURN = "DownloadSuspendedWindowResultReturn"
|
||||
private const val EVENT_INSTALL_SUSPENDED_WINDOW_DIALOG_SHOW = "InstallSuspendedWindowDialogShow"
|
||||
private const val EVENT_INSTALL_SUSPENDED_WINDOW_DIALOG_CLICK = "InstallSuspendedWindowDialogClick"
|
||||
|
||||
private const val EVENT_HALO_SELF_CLICK = "HaloSelfClick"
|
||||
|
||||
private const val EVENT_COLUMN_TEST_CLICK = "ColumnTestClick"
|
||||
|
||||
@ -4288,6 +4287,45 @@ object SensorsBridge {
|
||||
trackEvent(EVENT_COLUMN_TEST_CLICK, json)
|
||||
}
|
||||
|
||||
/**
|
||||
* 事件ID:HaloSelfClick
|
||||
* 事件名称:我的光环点击事件
|
||||
* 触发时机:我的光环点击内容时上报
|
||||
* @param profile 点击内容的分组,包括:
|
||||
* ①顶部区域:右上角及用户信息区域
|
||||
* ②常用功能:“我的游戏、我的发布、我的游戏单、浏览记录、我的收藏”区域
|
||||
* ③推荐位:-
|
||||
* ④活动位:-
|
||||
* ⑤更多功能 :-
|
||||
* ⑥其他:更多功能下方固定展示的区域
|
||||
* @param text 点击内容的文案,包括:
|
||||
* ①顶部区域:开启深色模式、关闭深色模式、签到、消息中心、立即登录、个人主页、我的徽章
|
||||
* ②常用功能:“我的游戏、我的发布、我的游戏单、浏览记录、我的收藏”区域
|
||||
* ③推荐位:上报点击内容标题,例如“我的游戏”
|
||||
* ④活动位:固定上报为“轮播图”
|
||||
* ⑤更多功能 :上报点击内容标题,例如“游戏动态”
|
||||
* ⑥其他:更上报点击内容标题,例如“设置”
|
||||
* @param linkType 上报链接的类型,分组名称为“推荐位、活动位、更多内容”时上报
|
||||
* @param linkId 上报链接的ID,分组名称为“推荐位、活动位、更多内容”时上报
|
||||
* @param linkText 上报链接的标题,分组名称为“推荐位、活动位、更多内容”时上报
|
||||
*/
|
||||
fun trackHaloSelfClick(
|
||||
profile: String,
|
||||
text: String,
|
||||
linkType: String,
|
||||
linkId: String,
|
||||
linkText: String
|
||||
) {
|
||||
val json = json {
|
||||
KEY_PROFILE to profile
|
||||
KEY_TEXT to text
|
||||
KEY_LINK_TYPE to linkType
|
||||
KEY_LINK_ID to linkId
|
||||
KEY_LINK_TEXT to linkText
|
||||
}
|
||||
trackEvent(EVENT_HALO_SELF_CLICK, json)
|
||||
}
|
||||
|
||||
/**
|
||||
* 事件ID:SearchDiscoveryClick
|
||||
* 事件名称:搜索发现点击事件
|
||||
|
||||
Reference in New Issue
Block a user