From 3447ecffd800796dc0a05d11586ee181b5b9fa2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E5=AD=90=E7=BB=B4?= Date: Wed, 28 Aug 2024 11:31:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B8=B8=E6=88=8F=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E8=A1=A5=E5=85=85=E7=A5=9E=E7=AD=96=E5=9F=8B?= =?UTF-8?q?=E7=82=B9=E2=80=94=E5=AE=A2=E6=88=B7=E7=AB=AF=20https://jira.sh?= =?UTF-8?q?anqu.cc/browse/GHZSCY-6601?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gamedetail/GameDetailFragment.kt | 41 ++++++++++++++++--- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailFragment.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailFragment.kt index f8401988ca..d5c267116e 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailFragment.kt @@ -63,7 +63,10 @@ import com.gh.gamecenter.databinding.* import com.gh.gamecenter.entity.GameUpdateEntity import com.gh.gamecenter.entity.RecommendPopupEntity import com.gh.gamecenter.eventbus.* -import com.gh.gamecenter.feature.entity.* +import com.gh.gamecenter.feature.entity.GameEntity +import com.gh.gamecenter.feature.entity.PluginLocation +import com.gh.gamecenter.feature.entity.SimpleGame +import com.gh.gamecenter.feature.entity.TagStyleEntity import com.gh.gamecenter.feature.eventbus.EBConcernChanged import com.gh.gamecenter.feature.exposure.ExposureEvent import com.gh.gamecenter.feature.utils.ApkActiveUtils @@ -71,11 +74,7 @@ import com.gh.gamecenter.feature.utils.SentryHelper import com.gh.gamecenter.forum.detail.ForumDetailActivity import com.gh.gamecenter.gamedetail.cloudarchive.CloudArchiveFragment import com.gh.gamecenter.gamedetail.desc.DescFragment -import com.gh.gamecenter.gamedetail.dialog.GameBigEventDialog -import com.gh.gamecenter.gamedetail.dialog.GameDetailMoreDialog -import com.gh.gamecenter.gamedetail.dialog.GameTagsDialog -import com.gh.gamecenter.gamedetail.dialog.SpecialDownloadDialogFragment -import com.gh.gamecenter.gamedetail.dialog.SpecialDownloadVisibilityViewModel +import com.gh.gamecenter.gamedetail.dialog.* import com.gh.gamecenter.gamedetail.entity.ContentCardEntity import com.gh.gamecenter.gamedetail.entity.NewGameDetailEntity import com.gh.gamecenter.gamedetail.entity.Video @@ -1180,6 +1179,11 @@ class GameDetailFragment : BaseLazyFragment(), IScrollable { } private fun doShowAlertDialog(dialog: GameEntity.Dialog) { + SensorsBridge.trackEvent("GameDetailDialogShow", + "game_id", mGameEntity?.id ?: "", + "game_name", mGameEntity?.name ?: "", + "game_type", mGameEntity?.categoryChinese ?: "" + ) DialogHelper.showDialogWithHtmlContent( requireContext(), dialog.title, @@ -1187,8 +1191,33 @@ class GameDetailFragment : BaseLazyFragment(), IScrollable { dialog.confirmButton.text.toString(), dialog.closeButtonText, { + SensorsBridge.trackEvent("GameDetailDialogClick", + "game_id", mGameEntity?.id ?: "", + "game_name", mGameEntity?.name ?: "", + "game_type", mGameEntity?.categoryChinese ?: "", + "link_type", dialog.confirmButton.type ?: "", + "link_id", dialog.confirmButton.link ?: "", + "link_text", dialog.confirmButton.linkText ?: "", + "button_name", dialog.confirmButton.text.toString() + ) dialog.confirmButton.text = dialog.confirmButton.linkText DirectUtils.directToLinkPage(requireContext(), dialog.confirmButton, mEntrance, "") + }, + { + SensorsBridge.trackEvent("GameDetailDialogClick", + "game_id", mGameEntity?.id ?: "", + "game_name", mGameEntity?.name ?: "", + "game_type", mGameEntity?.categoryChinese ?: "", + "button_name", dialog.closeButtonText + ) + }, + { + SensorsBridge.trackEvent("GameDetailDialogClick", + "game_id", mGameEntity?.id ?: "", + "game_name", mGameEntity?.name ?: "", + "game_type", mGameEntity?.categoryChinese ?: "", + "button_name", "关闭弹窗" + ) } ) }