From 8a0c7c99923b79befb1367f4e30dd35e9eaedc0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E5=AD=90=E7=BB=B4?= Date: Thu, 2 Feb 2023 15:06:45 +0800 Subject: [PATCH 01/17] =?UTF-8?q?fix:=E3=80=90=E5=85=89=E7=8E=AF=E5=8A=A9?= =?UTF-8?q?=E6=89=8B=E3=80=91=E9=A6=96=E9=A1=B5/=E7=89=88=E5=9D=97?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E5=88=97=E8=A1=A8-=E5=AE=89=E5=88=A9?= =?UTF-8?q?=E5=A2=99=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98=20https://jira.sh?= =?UTF-8?q?anqu.cc/browse/GHZS-1148?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/gh/gamecenter/adapter/viewholder/GameHeadViewHolder.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/gh/gamecenter/adapter/viewholder/GameHeadViewHolder.kt b/app/src/main/java/com/gh/gamecenter/adapter/viewholder/GameHeadViewHolder.kt index 655bb46ed9..bfb8c81114 100644 --- a/app/src/main/java/com/gh/gamecenter/adapter/viewholder/GameHeadViewHolder.kt +++ b/app/src/main/java/com/gh/gamecenter/adapter/viewholder/GameHeadViewHolder.kt @@ -54,6 +54,7 @@ class GameHeadViewHolder(var binding: GameHeadItemBinding) : && subject.type != "column_collection" && subject.type != "gallery_slide" && subject.type != "game_list_collection" + && subject.type != "top_game_comment" ) { binding.headMore.visibility = View.GONE } else if (subject.home == "hide") { From 61d48fe392c1c146c5b5a4adf467c35f70810194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=8E=89=E4=B9=85?= Date: Thu, 2 Feb 2023 16:10:06 +0800 Subject: [PATCH 02/17] =?UTF-8?q?fix:=20=E3=80=90=E5=85=89=E7=8E=AF?= =?UTF-8?q?=E5=8A=A9=E6=89=8B=E3=80=91=E6=B8=B8=E6=88=8F=E8=AF=A6=E6=83=85?= =?UTF-8?q?-=E5=A4=A7=E5=AE=B6=E9=83=BD=E5=9C=A8=E7=8E=A9=20=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E9=97=AE=E9=A2=98(2)=20https://jira.shanqu.cc/browse/?= =?UTF-8?q?GHZS-1147?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gh/gamecenter/game/horizontal/GameHorizontalAdapter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/gh/gamecenter/game/horizontal/GameHorizontalAdapter.kt b/app/src/main/java/com/gh/gamecenter/game/horizontal/GameHorizontalAdapter.kt index 2aa080fe88..771c475dca 100644 --- a/app/src/main/java/com/gh/gamecenter/game/horizontal/GameHorizontalAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/game/horizontal/GameHorizontalAdapter.kt @@ -3,7 +3,6 @@ package com.gh.gamecenter.game.horizontal import android.content.Context import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView -import com.gh.gamecenter.feature.exposure.ExposureEvent import com.gh.common.util.DataCollectionUtils import com.gh.common.util.DownloadItemUtils import com.gh.common.util.NewLogUtils @@ -16,6 +15,7 @@ import com.gh.gamecenter.common.utils.toBinding import com.gh.gamecenter.common.utils.toPx import com.gh.gamecenter.core.utils.StringUtils import com.gh.gamecenter.entity.SubjectEntity +import com.gh.gamecenter.feature.exposure.ExposureEvent import com.lightgame.adapter.BaseRecyclerAdapter import com.lightgame.download.DownloadEntity @@ -116,7 +116,7 @@ class GameHorizontalAdapter( ) } - if (mSubjectEntity.showDownload) { + if (mSubjectEntity.showDownload && type != GameHorizontalListType.GameDetailHorizontalType) { DownloadItemUtils.setOnClickListener( mContext, holder.binding.simpleGameContainer.downloadBtn, From 3308f18133d89bf97dad084721a97c8e318dc429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=8E=89=E4=B9=85?= Date: Thu, 2 Feb 2023 18:41:02 +0800 Subject: [PATCH 03/17] =?UTF-8?q?fix:=20=E3=80=90=E5=85=89=E7=8E=AF?= =?UTF-8?q?=E5=8A=A9=E6=89=8B=E3=80=91=E8=87=AA=E5=AE=9A=E4=B9=89=E6=A0=8F?= =?UTF-8?q?=E7=9B=AE-=E6=AD=A3=E6=96=87=E8=AF=B4=E6=98=8E=20=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98=20https://jira.shanqu.cc/browse/GHZ?= =?UTF-8?q?S-1149?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/gh/gamecenter/gamedetail/desc/DescAdapter.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/desc/DescAdapter.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/desc/DescAdapter.kt index 16bf3ecf8e..8875c5769b 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/desc/DescAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/desc/DescAdapter.kt @@ -952,7 +952,12 @@ class DescAdapter( setShrankTextAndExpandedText(shrankSpanned, expandedSpanned) } goneIf(TextUtils.isEmpty(customColumn.des)) - setSelfCalculateMaxLinesCallback { mExpandableTextViewMaxLinesSparseIntArray.put(position, it) } + setSelfCalculateMaxLinesCallback { + mExpandableTextViewMaxLinesSparseIntArray.put(position, it) + if (maxDesLines != it) { + post { notifyItemChanged(position) } + } + } setExpandCallback { mExpandableTextExpandStatusSparseBooleanArray.put(position, true) if (customColumn.name == "游戏简介") { From c8957173939459190d88cd68501bb649256d85f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=8E=89=E4=B9=85?= Date: Fri, 3 Feb 2023 09:55:43 +0800 Subject: [PATCH 04/17] =?UTF-8?q?fix:=20=E9=95=9C=E5=83=8F=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E2=80=94=E5=AE=A2=E6=88=B7=E7=AB=AF=20https://jira.shanqu.cc/b?= =?UTF-8?q?rowse/GHZS-1161?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gh/gamecenter/feature/entity/GameEntity.kt | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/module_core_feature/src/main/java/com/gh/gamecenter/feature/entity/GameEntity.kt b/module_core_feature/src/main/java/com/gh/gamecenter/feature/entity/GameEntity.kt index 425caf61c5..f8f0b50677 100644 --- a/module_core_feature/src/main/java/com/gh/gamecenter/feature/entity/GameEntity.kt +++ b/module_core_feature/src/main/java/com/gh/gamecenter/feature/entity/GameEntity.kt @@ -31,9 +31,9 @@ data class GameEntity( private var mName: String? = null, // 将 name 变成私有 mName 调用 name 时直接拼接成 mName + nameSuffix @SerializedName("name_suffix") var nameSuffix: String = "", - var subtitle: String = "", + private var mSubtitle: String = "", @SerializedName("subtitle_style") - var subtitleStyle: TagStyleEntity? = null, + private var mSubtitleStyle: TagStyleEntity? = null, @SerializedName("advance_download") var advanceDownload: Boolean = false, @SerializedName("brief") @@ -435,6 +435,20 @@ data class GameEntity( mBrief = value } + @IgnoredOnParcel + var subtitle: String + get() = if (shouldUseMirrorInfo()) mirrorData?.mSubtitle ?: "" else mSubtitle + set(value) { + mSubtitle = value + } + + @IgnoredOnParcel + var subtitleStyle: TagStyleEntity? + get() = if (shouldUseMirrorInfo()) mirrorData?.mSubtitleStyle else mSubtitleStyle + set(value) { + mSubtitleStyle = value + } + @IgnoredOnParcel var hideSizeInsideDes: Boolean = false From a241ea4ad3fb36d693ce14fec89e08e177d5a7f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=8E=89=E4=B9=85?= Date: Fri, 3 Feb 2023 11:28:17 +0800 Subject: [PATCH 05/17] =?UTF-8?q?fix:=20=E9=95=9C=E5=83=8F=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E2=80=94=E5=AE=A2=E6=88=B7=E7=AB=AF=20https://jira.shanqu.cc/b?= =?UTF-8?q?rowse/GHZS-1161?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/gh/gamecenter/feature/entity/GameEntity.kt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/module_core_feature/src/main/java/com/gh/gamecenter/feature/entity/GameEntity.kt b/module_core_feature/src/main/java/com/gh/gamecenter/feature/entity/GameEntity.kt index f8f0b50677..42a0608256 100644 --- a/module_core_feature/src/main/java/com/gh/gamecenter/feature/entity/GameEntity.kt +++ b/module_core_feature/src/main/java/com/gh/gamecenter/feature/entity/GameEntity.kt @@ -35,7 +35,7 @@ data class GameEntity( @SerializedName("subtitle_style") private var mSubtitleStyle: TagStyleEntity? = null, @SerializedName("advance_download") - var advanceDownload: Boolean = false, + private var mAdvanceDownload: Boolean = false, @SerializedName("brief") private var mBrief: String? = null, @@ -449,6 +449,13 @@ data class GameEntity( mSubtitleStyle = value } + @IgnoredOnParcel + var advanceDownload: Boolean + get() = if (shouldUseMirrorInfo()) mirrorData?.mAdvanceDownload ?: false else mAdvanceDownload + set(value) { + mAdvanceDownload = value + } + @IgnoredOnParcel var hideSizeInsideDes: Boolean = false @@ -920,6 +927,8 @@ class SimpleGame( var subtitle: String? = "", @SerializedName("subtitle_style") var subtitleStyle: TagStyleEntity? = null, + @SerializedName("advance_download") + var advanceDownload: Boolean = false, ) : Parcelable { @IgnoredOnParcel @@ -947,6 +956,7 @@ class SimpleGame( gameEntity.downloadStatus = downloadStatus gameEntity.subtitle = subtitle ?: "" gameEntity.subtitleStyle = subtitleStyle + gameEntity.advanceDownload = advanceDownload return gameEntity } From 4b70b03c0dc043531c12a495cf18b4f61932389a Mon Sep 17 00:00:00 2001 From: chenjuntao Date: Fri, 3 Feb 2023 11:38:28 +0800 Subject: [PATCH 06/17] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B8=B8?= =?UTF-8?q?=E6=88=8F=E8=AF=A6=E6=83=85=20tab=20=E7=82=B9=E5=87=BB=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5=E5=BC=82=E5=B8=B8=20https://jira.shanqu.cc/browse/GHZ?= =?UTF-8?q?S-1164?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gamedetail/GameDetailFragment.kt | 42 ++++++++++++++++--- 1 file changed, 36 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 719a58c125..8ce9d51f03 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailFragment.kt @@ -101,6 +101,7 @@ import java.lang.ref.WeakReference import java.util.* import kotlin.math.abs +// TODO 更改现有的使用 INDEX_DESC, INDEX_BBS 等固定数值来确定 tab 位置的做法,避免后续更改 tab 位置出现奇怪的异常 class GameDetailFragment : ToolbarFragment(), IScrollable { private var mDownloadMenuIcon: ImageView? = null @@ -1798,11 +1799,11 @@ class GameDetailFragment : ToolbarFragment(), IScrollable { private fun logTabClick(position: Int) { val entrance = if (mEntrance.contains("论坛详情")) "论坛" else "游戏" mGameEntity?.run { - when (position) { - INDEX_DESC -> { + when (getTabContentForReal(position)) { + TAB_DESC -> { NewLogUtils.logGameDetailTabClick(name ?: "", id, "详情") } - INDEX_TRENDES -> { + TAB_TRENDS -> { NewLogUtils.logGameDetailTabClick( "view_game_detail_special_area_tab", entrance, @@ -1812,24 +1813,46 @@ class GameDetailFragment : ToolbarFragment(), IScrollable { ) NewLogUtils.logGameDetailTabClick(name ?: "", id, "专区") } - INDEX_ARCHIVE -> { + TAB_ARCHIVE -> { NewFlatLogUtils.logCloudArchiveGameDetailTabRelated( "cloud_save_tab_click", mGameEntity?.id ?: "", mGameEntity?.name ?: "" ) } - INDEX_RATING -> { + TAB_RATING -> { NewLogUtils.logGameDetailTabClick("view_game_detail_comment_tab", entrance, id, gameType, bbsId) NewLogUtils.logGameDetailTabClick(name ?: "", id, "评论") } - INDEX_BBS -> { + TAB_BBS -> { NewLogUtils.logGameDetailTabClick(name ?: "", id, "论坛") } } } } + /** + * 获取真实的 tab 内容类型 + * @param position tab 的位置 + * @return 真实的 + */ + private fun getTabContentForReal(position: Int): String { + return when (mTabTitleList[position]) { + getString(R.string.game_detail_dongtai), + mNewGameDetailEntity?.zone?.customName -> TAB_TRENDS + + getString(R.string.game_detail_cloud_archive) -> TAB_ARCHIVE + + getString(R.string.game_detail_comment) -> TAB_RATING + + getString(R.string.game_detail_bbs) -> TAB_BBS + + getString(R.string.game_detail_desc) -> TAB_DESC + + else -> TAB_DESC + } + } + private fun handleTabTouchEvent(title: String) { if (title == mTabClickEvent.second && System.currentTimeMillis() - mTabClickEvent.first < 300) { val fragment = mFragmentsList[mBodyBinding.gamedetailVp.currentItem] @@ -2252,6 +2275,13 @@ class GameDetailFragment : ToolbarFragment(), IScrollable { const val INDEX_ARCHIVE = 2 const val INDEX_RATING = 3 const val INDEX_BBS = 4 + + const val TAB_DESC = "详情" + const val TAB_TRENDS = "专区" + const val TAB_ARCHIVE = "云存档" + const val TAB_RATING = "评价" + const val TAB_BBS = "论坛" + const val SKIP_DESC = "skipDesc" const val SKIP_FULI = "skipFuli" const val SKIP_RATING = "skipRatting" From f1d7ecda570a1c40629b040630aea89c5677d6e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=8E=89=E4=B9=85?= Date: Fri, 3 Feb 2023 13:56:33 +0800 Subject: [PATCH 07/17] =?UTF-8?q?fix:=20=E6=B8=B8=E6=88=8F=E9=95=9C?= =?UTF-8?q?=E5=83=8F=E7=9B=B8=E5=85=B3=E6=95=B0=E6=8D=AE=E5=9F=8B=E7=82=B9?= =?UTF-8?q?=E8=A1=A5=E5=85=85=E2=80=94=E5=AE=A2=E6=88=B7=E7=AB=AF=20https:?= =?UTF-8?q?//jira.shanqu.cc/browse/GHZS-1157?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/gh/common/filter/RegionSetting.kt | 5 +++- .../gh/common/filter/RegionSettingHelper.kt | 5 ++++ .../RegionSettingHelperProviderImpl.kt | 7 +++++- .../com/gh/common/util/NewFlatLogUtils.kt | 25 ++++++++++++++++--- .../gamedetail/GameDetailFragment.kt | 12 +++------ .../common/entity/ExposureEntity.kt | 3 +++ .../gh/gamecenter/feature/entity/IpInfo.kt | 7 ++++++ .../feature/exposure/ExposureEvent.kt | 8 +++++- .../provider/IRegionSettingHelperProvider.kt | 3 +++ 9 files changed, 61 insertions(+), 14 deletions(-) create mode 100644 module_core_feature/src/main/java/com/gh/gamecenter/feature/entity/IpInfo.kt diff --git a/app/src/main/java/com/gh/common/filter/RegionSetting.kt b/app/src/main/java/com/gh/common/filter/RegionSetting.kt index e6c6953bbe..1826b1ea65 100644 --- a/app/src/main/java/com/gh/common/filter/RegionSetting.kt +++ b/app/src/main/java/com/gh/common/filter/RegionSetting.kt @@ -1,6 +1,7 @@ package com.gh.common.filter import androidx.annotation.Keep +import com.gh.gamecenter.feature.entity.IpInfo import com.google.gson.annotations.SerializedName @Keep @@ -14,7 +15,9 @@ class RegionSetting( @SerializedName("game_h5_download") var gameH5DownloadList: List, @SerializedName("game_special_download") - var gameSpecialDownloadInfoList: List + var gameSpecialDownloadInfoList: List, + @SerializedName("ip_info") + var ipInfo: IpInfo? = null ) { @Keep diff --git a/app/src/main/java/com/gh/common/filter/RegionSettingHelper.kt b/app/src/main/java/com/gh/common/filter/RegionSettingHelper.kt index 99f48320f1..b19095eb5b 100644 --- a/app/src/main/java/com/gh/common/filter/RegionSettingHelper.kt +++ b/app/src/main/java/com/gh/common/filter/RegionSettingHelper.kt @@ -9,6 +9,7 @@ import com.gh.gamecenter.common.utils.toJson import com.gh.gamecenter.common.utils.toObject import com.gh.gamecenter.core.utils.SPUtils import com.gh.gamecenter.feature.entity.GameEntity +import com.gh.gamecenter.feature.entity.IpInfo import com.gh.gamecenter.feature.entity.SimpleGame import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp @@ -22,6 +23,7 @@ object RegionSettingHelper { private var mDisplayMirrorIfoGameIdSet: HashSet? = hashSetOf() private var mGameH5DownloadList: List? = listOf() private var mGameSpecialDownloadInfoList: List? = listOf() + private var mIpInfo: IpInfo? = null private const val SP_SETTING = "region_setting" const val SP_SETTING_FAILURE = "region_setting_failure" @@ -41,6 +43,8 @@ object RegionSettingHelper { @JvmStatic fun getGameSpecialDownloadInfo(gameId: String) = mGameSpecialDownloadInfoList?.find { it.gameId == gameId } + fun getIpInfo(): IpInfo? = mIpInfo + @JvmStatic fun filterGame(list: List?): ArrayList { if (list == null) return arrayListOf() @@ -118,6 +122,7 @@ object RegionSettingHelper { mChannelControl = data.channelControl mGameH5DownloadList = data.gameH5DownloadList mGameSpecialDownloadInfoList = data.gameSpecialDownloadInfoList + mIpInfo = data.ipInfo } /** diff --git a/app/src/main/java/com/gh/common/provider/RegionSettingHelperProviderImpl.kt b/app/src/main/java/com/gh/common/provider/RegionSettingHelperProviderImpl.kt index d42d9eac31..c64bcf9d30 100644 --- a/app/src/main/java/com/gh/common/provider/RegionSettingHelperProviderImpl.kt +++ b/app/src/main/java/com/gh/common/provider/RegionSettingHelperProviderImpl.kt @@ -5,10 +5,11 @@ import com.alibaba.android.arouter.facade.annotation.Route import com.gh.common.filter.RegionSettingHelper import com.gh.gamecenter.common.constant.RouteConsts import com.gh.gamecenter.feature.entity.GameEntity +import com.gh.gamecenter.feature.entity.IpInfo import com.gh.gamecenter.feature.provider.IRegionSettingHelperProvider @Route(path = RouteConsts.provider.regionSettingHelper, name = "RegionSettingHelper暴露服务") -class RegionSettingHelperProviderImpl: IRegionSettingHelperProvider { +class RegionSettingHelperProviderImpl : IRegionSettingHelperProvider { override fun shouldThisGameDisplayMirrorInfo(gameId: String): Boolean { return RegionSettingHelper.shouldThisGameDisplayMirrorInfo(gameId) } @@ -21,6 +22,10 @@ class RegionSettingHelperProviderImpl: IRegionSettingHelperProvider { return RegionSettingHelper.filterGame(list) } + override fun getIpInfo(): IpInfo? { + return RegionSettingHelper.getIpInfo() + } + override fun init(context: Context?) { // Do nothing } diff --git a/app/src/main/java/com/gh/common/util/NewFlatLogUtils.kt b/app/src/main/java/com/gh/common/util/NewFlatLogUtils.kt index 9db826b3ed..7cd6c1291d 100644 --- a/app/src/main/java/com/gh/common/util/NewFlatLogUtils.kt +++ b/app/src/main/java/com/gh/common/util/NewFlatLogUtils.kt @@ -1,5 +1,6 @@ package com.gh.common.util +import com.gh.common.filter.RegionSettingHelper import com.gh.gamecenter.common.json.JsonObjectBuilder import com.gh.gamecenter.common.json.json import com.gh.gamecenter.common.loghub.LoghubUtils @@ -541,10 +542,28 @@ object NewFlatLogUtils { log(json) } - //进入游戏详情/离开游戏详情 - fun logGameDetailEnterOrExit(event: String, gameName: String, gameId: String) { + //进入游戏详情 + fun logGameDetailEnter(gameName: String, gameId: String, isMirrorData: Boolean) { + val ipInfo = RegionSettingHelper.getIpInfo() val json = json { - KEY_EVENT to event + KEY_EVENT to "game_detail_enter" + KEY_GAME_NAME to gameName + KEY_GAME_ID to gameId + "is_mirror_data" to isMirrorData + if (ipInfo != null) { + "country" to ipInfo.country + "province" to ipInfo.province + "city" to ipInfo.city + } + parseAndPutMeta().invoke(this) + } + log(json) + } + + //离开游戏详情 + fun logGameDetailExit(gameName: String, gameId: String) { + val json = json { + KEY_EVENT to "game_detail_exit" KEY_GAME_NAME to gameName KEY_GAME_ID to gameId parseAndPutMeta().invoke(this) 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 719a58c125..923ec1861d 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailFragment.kt @@ -697,10 +697,10 @@ class GameDetailFragment : ToolbarFragment(), IScrollable { if (mEntrance.contains(EntranceConsts.ENTRANCE_WELCOME) && mEntrance.countOccurrences("+") <= 1) { mGameEntity?.setWelcomeDialogInfoIfAvailable() } - NewFlatLogUtils.logGameDetailEnterOrExit( - "game_detail_enter", + NewFlatLogUtils.logGameDetailEnter( mGameEntity?.name ?: "", - mGameEntity?.id ?: "" + mGameEntity?.id ?: "", + mGameEntity?.shouldUseMirrorInfo() ?: false ) } else if (gameResource.status == Status.ERROR) { loadErrorControl(gameResource.exception) @@ -2109,11 +2109,7 @@ class GameDetailFragment : ToolbarFragment(), IScrollable { } override fun onParentActivityFinish() { - NewFlatLogUtils.logGameDetailEnterOrExit( - "game_detail_exit", - mGameEntity?.name ?: "", - mGameEntity?.id ?: "" - ) + NewFlatLogUtils.logGameDetailExit(mGameEntity?.name ?: "", mGameEntity?.id ?: "") } override fun onDestroy() { diff --git a/module_common/src/main/java/com/gh/gamecenter/common/entity/ExposureEntity.kt b/module_common/src/main/java/com/gh/gamecenter/common/entity/ExposureEntity.kt index 43a28da17b..6b3c15c6b6 100644 --- a/module_common/src/main/java/com/gh/gamecenter/common/entity/ExposureEntity.kt +++ b/module_common/src/main/java/com/gh/gamecenter/common/entity/ExposureEntity.kt @@ -79,6 +79,9 @@ class ExposureEntity( var controlLinkName: String? = null, @SerializedName("is_ad_data") var isAdData: Boolean = false, + var country: String = "", + var province: String = "", + var city: String = "", ) : Parcelable { fun setContainerInfo(id: String?, type: String?) { diff --git a/module_core_feature/src/main/java/com/gh/gamecenter/feature/entity/IpInfo.kt b/module_core_feature/src/main/java/com/gh/gamecenter/feature/entity/IpInfo.kt new file mode 100644 index 0000000000..3aa58ed2ca --- /dev/null +++ b/module_core_feature/src/main/java/com/gh/gamecenter/feature/entity/IpInfo.kt @@ -0,0 +1,7 @@ +package com.gh.gamecenter.feature.entity + +class IpInfo( + var country: String, + var province: String, + var city: String, +) \ No newline at end of file diff --git a/module_core_feature/src/main/java/com/gh/gamecenter/feature/exposure/ExposureEvent.kt b/module_core_feature/src/main/java/com/gh/gamecenter/feature/exposure/ExposureEvent.kt index b389e9fe2f..d85bfe8932 100644 --- a/module_core_feature/src/main/java/com/gh/gamecenter/feature/exposure/ExposureEvent.kt +++ b/module_core_feature/src/main/java/com/gh/gamecenter/feature/exposure/ExposureEvent.kt @@ -13,6 +13,7 @@ import com.gh.gamecenter.common.utils.getFirstElementDividedByDivider import com.gh.gamecenter.core.provider.IBrowserInstallHelperProvider import com.gh.gamecenter.feature.entity.GameEntity import com.gh.gamecenter.feature.exposure.time.TimeUtil +import com.gh.gamecenter.feature.provider.IRegionSettingHelperProvider import com.lightgame.download.DownloadEntity import com.lightgame.utils.Utils import kotlinx.parcelize.IgnoredOnParcel @@ -52,6 +53,8 @@ data class ExposureEvent( } val browserInstallHelper = ARouter.getInstance().build(RouteConsts.provider.browserInstallHelper) .navigation() as? IBrowserInstallHelperProvider + val regionSettingHelper = ARouter.getInstance().build(RouteConsts.provider.regionSettingHelper) + .navigation() as? IRegionSettingHelperProvider this.payload = ExposureEntity( gameId = gameEntity?.id?.getFirstElementDividedByDivider(DownloadEntity.GAME_ID_DIVIDER), gameName = eTrace?.firstOrNull()?.payload?.gameName @@ -79,7 +82,10 @@ data class ExposureEvent( ?: eTrace?.firstOrNull()?.payload?.welcomeDialogId, welcomeDialogLinkTitle = gameEntity?.welcomeDialogTitle ?: eTrace?.firstOrNull()?.payload?.welcomeDialogLinkTitle, - isAdData = gameEntity?.isAdData ?: eTrace?.firstOrNull()?.payload?.isAdData ?: false + isAdData = gameEntity?.isAdData ?: eTrace?.firstOrNull()?.payload?.isAdData ?: false, + country = regionSettingHelper?.getIpInfo()?.country ?: "", + province = regionSettingHelper?.getIpInfo()?.province ?: "", + city = regionSettingHelper?.getIpInfo()?.city ?: "" ) this.id = UUID.randomUUID().toString() this.timeInMillisecond = System.currentTimeMillis() diff --git a/module_core_feature/src/main/java/com/gh/gamecenter/feature/provider/IRegionSettingHelperProvider.kt b/module_core_feature/src/main/java/com/gh/gamecenter/feature/provider/IRegionSettingHelperProvider.kt index 9d7e06f903..99ea06fb44 100644 --- a/module_core_feature/src/main/java/com/gh/gamecenter/feature/provider/IRegionSettingHelperProvider.kt +++ b/module_core_feature/src/main/java/com/gh/gamecenter/feature/provider/IRegionSettingHelperProvider.kt @@ -2,6 +2,7 @@ package com.gh.gamecenter.feature.provider import com.alibaba.android.arouter.facade.template.IProvider import com.gh.gamecenter.feature.entity.GameEntity +import com.gh.gamecenter.feature.entity.IpInfo interface IRegionSettingHelperProvider : IProvider { @@ -10,4 +11,6 @@ interface IRegionSettingHelperProvider : IProvider { fun shouldThisGameShowSpecialDownload(gameId: String):Boolean fun filterGame(list: List): ArrayList + + fun getIpInfo(): IpInfo? } \ No newline at end of file From 9aa21d6649ce7f519f4387ab89f721642fb2f223 Mon Sep 17 00:00:00 2001 From: chenjuntao Date: Mon, 6 Feb 2023 15:56:05 +0800 Subject: [PATCH 08/17] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B5=8F?= =?UTF-8?q?=E8=A7=88=E5=99=A8=E5=AE=89=E8=A3=85=E6=A8=A1=E5=BC=8F=E4=B8=8B?= =?UTF-8?q?XAPK=E6=97=A0=E6=B3=95=E5=AE=89=E8=A3=85=E9=97=AE=E9=A2=98=20ht?= =?UTF-8?q?tps://jira.shanqu.cc/browse/GHZS-1167?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/gh/common/xapk/XapkUnzipThread.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/gh/common/xapk/XapkUnzipThread.kt b/app/src/main/java/com/gh/common/xapk/XapkUnzipThread.kt index 410c227662..7c769b0cfd 100644 --- a/app/src/main/java/com/gh/common/xapk/XapkUnzipThread.kt +++ b/app/src/main/java/com/gh/common/xapk/XapkUnzipThread.kt @@ -7,6 +7,7 @@ import com.gh.gamecenter.common.utils.getExtension import com.gh.gamecenter.common.utils.throwException import com.gh.gamecenter.common.utils.throwExceptionInDebug import com.gh.gamecenter.BuildConfig +import com.gh.gamecenter.core.utils.MD5Utils import com.halo.assistant.HaloApp import com.lightgame.download.DownloadEntity import com.lightgame.download.FileUtils @@ -53,8 +54,9 @@ class XapkUnzipThread( val outputFile = if (zipEntry.name.getExtension() == XapkInstaller.XAPK_DATA_EXTENSION_NAME) { File(absolutePath + File.separator + zipEntry.name) } else if (zipEntry.name.getExtension() == XapkInstaller.PACKAGE_EXTENSION_NAME) { - // apk文件名称 = xapk文件名+本身的文件名称 - val fileName = xapkFile.nameWithoutExtension + "_" + zipEntry.name + // apk文件名称 = xapk文件名 + MD5(本身的文件名称) + ".apk" + // 如 abc_com.gh.gamecenter.apk 这样的文件名,在使用浏览器安装时系统浏览器可能会抹掉文件类型,导致无法唤起下载完自动安装,这里去掉多个 "." 号,保证浏览器安装正常使用 + val fileName = xapkFile.nameWithoutExtension + "_" + MD5Utils.getContentMD5(zipEntry.name) + "." + XapkInstaller.PACKAGE_EXTENSION_NAME File(FileUtils.getDownloadPath(HaloApp.getInstance().application, fileName)) } else continue // 暂时只需要解压xpk/obb文件 From f2874d6b03ceb04e731be0ad6950913429c88bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E5=AD=90=E7=BB=B4?= Date: Mon, 6 Feb 2023 17:03:19 +0800 Subject: [PATCH 09/17] =?UTF-8?q?fix:=E3=80=90=E5=85=89=E7=8E=AF=E5=8A=A9?= =?UTF-8?q?=E6=89=8B=E3=80=91=E6=B8=B8=E6=88=8F=E8=AF=84=E5=88=86=E5=9C=A8?= =?UTF-8?q?=E6=A8=A1=E6=8B=9F=E5=99=A8=E6=97=A0=E6=B3=95=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E9=97=AE=E9=A2=98=20https://jira.shanqu.cc/b?= =?UTF-8?q?rowse/GHZS-1155?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gamedetail/rating/RatingReplyActivity.kt | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyActivity.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyActivity.kt index 477ebb39e1..77a264bfe6 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyActivity.kt @@ -103,6 +103,7 @@ class RatingReplyActivity : ListActivity 0, height) + if (height <= 0) { + mOffset = abs(height) + } + val mLayoutParams = mInputBinding.answerCommentContentContainer.layoutParams as RelativeLayout.LayoutParams + mLayoutParams.height = LinearLayout.LayoutParams.WRAP_CONTENT + mLayoutParams.bottomMargin = if (height > 0) height + mOffset else 0 + mInputBinding.answerCommentContentContainer.layoutParams = mLayoutParams } - private fun popInputLayout(isPopup: Boolean, height: Int) { + private fun popInputLayout(isPopup: Boolean) { mInputPlaceholderBinding.root.goneIf(isPopup) mInputBinding.root.goneIf(!isPopup) mInputBinding.commentLine.goneIf(isPopup) @@ -356,7 +367,6 @@ class RatingReplyActivity : ListActivity Date: Tue, 7 Feb 2023 16:51:53 +0800 Subject: [PATCH 10/17] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=A7=A3?= =?UTF-8?q?=E5=8E=8B=E5=BC=82=E5=B8=B8=E5=AF=BC=E8=87=B4=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E8=A2=AB=E5=88=A0=E9=99=A4=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20https://jira.shanqu.cc/browse/GHZS-1167?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../download/GameDownloadFragmentAdapter.java | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/com/gh/gamecenter/download/GameDownloadFragmentAdapter.java b/app/src/main/java/com/gh/gamecenter/download/GameDownloadFragmentAdapter.java index cef383ff41..4f21437232 100644 --- a/app/src/main/java/com/gh/gamecenter/download/GameDownloadFragmentAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/download/GameDownloadFragmentAdapter.java @@ -157,6 +157,16 @@ class GameDownloadFragmentAdapter extends BaseRecyclerAdapter { viewHolder.binding.dmItemTvTitle.postDelayed(() -> viewHolder.binding.dmItemTvTitle.setSelected(true), 2000); } + if (downloadEntity.getUrl().equals(url)) { + viewHolder.binding.getRoot().setBackgroundColor(ContextCompat.getColor(mContext, R.color.select)); + } else { + viewHolder.binding.getRoot().setBackgroundResource(R.drawable.reuse_listview_item_style); + } + viewHolder.binding.getRoot().setOnLongClickListener(v -> { + showDeleteDialog(viewHolder.binding.dmItemTvStartorpause, downloadEntity, viewHolder.getPosition()); + return true; + }); + DownloadStatus status = downloadEntity.getStatus(); String xapkStatus = downloadEntity.getMeta().get(XapkInstaller.XAPK_UNZIP_STATUS); if (status.equals(DownloadStatus.done)) { @@ -334,17 +344,6 @@ class GameDownloadFragmentAdapter extends BaseRecyclerAdapter { } // DataUtils.onMtaEvent(HaloApp.getInstance().getApplication(), "下载管理", "游戏下载", str); }); - - if (downloadEntity.getUrl().equals(url)) { - viewHolder.binding.getRoot().setBackgroundColor(ContextCompat.getColor(mContext, R.color.select)); - } else { - viewHolder.binding.getRoot().setBackgroundResource(R.drawable.reuse_listview_item_style); - } - viewHolder.binding.getRoot().setOnLongClickListener(v -> { - showDeleteDialog(viewHolder.binding.dmItemTvStartorpause, downloadEntity, viewHolder.getPosition()); - return true; - }); - } else if (holder instanceof DownloadHeadViewHolder) { final DownloadHeadViewHolder viewHolder = (DownloadHeadViewHolder) holder; From ef7b8a7d794b149549588bc2fc1b635f5ffe730e Mon Sep 17 00:00:00 2001 From: chenjuntao Date: Tue, 7 Feb 2023 17:43:37 +0800 Subject: [PATCH 11/17] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=A8=AA?= =?UTF-8?q?=E5=90=91=E5=9B=BA=E5=AE=9A=E4=B8=93=E9=A2=98=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E6=B8=B8=E6=88=8F=E8=AF=A6=E6=83=85=E4=B8=8B=E8=BD=BD=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/gh/gamecenter/game/horizontal/GameHorizontalAdapter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/gh/gamecenter/game/horizontal/GameHorizontalAdapter.kt b/app/src/main/java/com/gh/gamecenter/game/horizontal/GameHorizontalAdapter.kt index 771c475dca..5c09fe0921 100644 --- a/app/src/main/java/com/gh/gamecenter/game/horizontal/GameHorizontalAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/game/horizontal/GameHorizontalAdapter.kt @@ -110,7 +110,7 @@ class GameHorizontalAdapter( GameDetailActivity.startGameDetailActivity( mContext, - gameEntity, + gameEntity.id, entranceResult, exposureEventList?.get(position) ) From eb6f07865484ae7603ff13bb15ff06f780ca0029 Mon Sep 17 00:00:00 2001 From: chenjuntao Date: Wed, 8 Feb 2023 10:34:11 +0800 Subject: [PATCH 12/17] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=95=85?= =?UTF-8?q?=E7=8E=A9=E7=BB=84=E4=BB=B6=E6=B2=A1=E6=9C=89=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E6=97=B6=E7=9A=84=E6=A3=80=E6=B5=8B=E5=AE=89=E8=A3=85=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/gh/vspace/VHelper.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/gh/vspace/VHelper.kt b/app/src/main/java/com/gh/vspace/VHelper.kt index 1a301f278a..b83636c90c 100644 --- a/app/src/main/java/com/gh/vspace/VHelper.kt +++ b/app/src/main/java/com/gh/vspace/VHelper.kt @@ -710,7 +710,7 @@ object VHelper { } // TODO 检测 32 位 - if (!PackageUtils.isInstalled(context, vaConfig.arch64?.packageName)) { + if (!PackageUtils.isInstalledFromAllPackage(context, vaConfig.arch64?.packageName)) { VSpaceDialogFragment.showDownloadDialog(context, getVSpaceDownloadEntity(false)) Utils.log(LOG_TAG, "显示下载畅玩空间弹窗") return true From fdc6907e93993deba4cd0205d2cd20f437c7dca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=8E=89=E4=B9=85?= Date: Wed, 8 Feb 2023 11:28:54 +0800 Subject: [PATCH 13/17] =?UTF-8?q?fix:=20=E3=80=90=E5=85=89=E7=8E=AF?= =?UTF-8?q?=E5=8A=A9=E6=89=8B=E3=80=91=E9=A6=96=E9=A1=B5/=E7=89=88?= =?UTF-8?q?=E5=9D=97=E5=86=85=E5=AE=B9=E5=88=97=E8=A1=A8-=E5=8F=91?= =?UTF-8?q?=E7=8E=B0=E9=A1=B5=20=E4=B8=8B=E8=BD=BD=E9=97=AE=E9=A2=98=20htt?= =?UTF-8?q?ps://jira.shanqu.cc/browse/GHZS-1200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/gh/gamecenter/home/HomeViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/gh/gamecenter/home/HomeViewModel.kt b/app/src/main/java/com/gh/gamecenter/home/HomeViewModel.kt index 572db294a8..b4851be00f 100644 --- a/app/src/main/java/com/gh/gamecenter/home/HomeViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/home/HomeViewModel.kt @@ -772,10 +772,10 @@ class HomeViewModel(application: Application) : AndroidViewModel(application) { } mSnapshotItemList.add(LegacyHomeSubjectTransformer.getBlankSpacingItem(HomeItemData()) as HomeItemData) mSnapshotItemList.add(homeItemData) - mSnapshotItemList.add(LegacyHomeSubjectTransformer.getBlankSpacingItem(HomeItemData()) as HomeItemData) mDiscoveryGameCard?.games?.forEach { addGamePositionAndPackage(it) } + mSnapshotItemList.add(LegacyHomeSubjectTransformer.getBlankSpacingItem(HomeItemData()) as HomeItemData) } } else { val unknown = HomeItemData() From 0588d072bc05cbd065fdf5840d1ed410bee091cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=8E=89=E4=B9=85?= Date: Wed, 8 Feb 2023 12:24:58 +0800 Subject: [PATCH 14/17] =?UTF-8?q?fix:=20=E9=95=9C=E5=83=8F=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E2=80=940206=E6=B5=8B=E8=AF=95=20https://jira.shanqu.cc/browse?= =?UTF-8?q?/GHZS-1187?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/gh/gamecenter/feature/entity/GameEntity.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/module_core_feature/src/main/java/com/gh/gamecenter/feature/entity/GameEntity.kt b/module_core_feature/src/main/java/com/gh/gamecenter/feature/entity/GameEntity.kt index 42a0608256..c63593d39e 100644 --- a/module_core_feature/src/main/java/com/gh/gamecenter/feature/entity/GameEntity.kt +++ b/module_core_feature/src/main/java/com/gh/gamecenter/feature/entity/GameEntity.kt @@ -31,6 +31,7 @@ data class GameEntity( private var mName: String? = null, // 将 name 变成私有 mName 调用 name 时直接拼接成 mName + nameSuffix @SerializedName("name_suffix") var nameSuffix: String = "", + @SerializedName("subtitle") private var mSubtitle: String = "", @SerializedName("subtitle_style") private var mSubtitleStyle: TagStyleEntity? = null, From 3972b6fa17d6053bc43c8cfd26ab4b52eb12d3a3 Mon Sep 17 00:00:00 2001 From: chenjuntao Date: Wed, 8 Feb 2023 14:26:21 +0800 Subject: [PATCH 15/17] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=AF=84?= =?UTF-8?q?=E4=BB=B7=E8=AF=A6=E6=83=85=E5=9B=9E=E5=A4=8D=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E9=AB=98=E4=BA=AE=E5=8F=AF=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20https://jira.shanqu.cc/browse/GHZS-1207?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gamedetail/rating/RatingReplyAdapter.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyAdapter.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyAdapter.kt index bf0c4ea099..04a22ee255 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyAdapter.kt @@ -273,10 +273,6 @@ class RatingReplyAdapter( likeCountTv.setDrawableStart(R.drawable.comment_vote_unselect) } likeCountTv.text = if (replyEntity.vote > 0) NumberUtils.transSimpleCount(replyEntity.vote) else "" - contentTv.setTextWithHighlightedTextWrappedInsideWrapper( - text = replyEntity.content, - copyClickedText = true - ) userIconIv.display( replyEntity.user.border, replyEntity.user.icon, @@ -292,6 +288,7 @@ class RatingReplyAdapter( badgeTv.visibility = View.GONE } val parent = replyEntity.parent + var contentCharSequence: CharSequence = replyEntity.content if (parent != null) { val prefix = "回复" val colon = " :" @@ -321,14 +318,17 @@ class RatingReplyAdapter( R.color.text_title ).build() - contentTv.text = SpannableStringBuilder() + contentCharSequence = SpannableStringBuilder() .append(prefixSpan) .append(parentUserNameSpan) .append(colonSpan) .append(replyEntity.content) - } else { - contentTv.text = replyEntity.content } + + contentTv.setTextWithHighlightedTextWrappedInsideWrapper( + text = contentCharSequence, + copyClickedText = true + ) badgeIv.setOnClickListener { DialogUtils.showViewBadgeDialog(mContext, replyEntity.user.badge, object : ConfirmListener { override fun onConfirm() { From 44b497a69701bdc214a99ec9c030dbb442195c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E5=AD=90=E7=BB=B4?= Date: Wed, 8 Feb 2023 14:59:37 +0800 Subject: [PATCH 16/17] =?UTF-8?q?fix:=20=E3=80=90=E5=85=89=E7=8E=AF?= =?UTF-8?q?=E5=8A=A9=E6=89=8B=E3=80=91=E6=A8=A1=E6=8B=9F=E5=99=A8banner?= =?UTF-8?q?=E5=9B=BE=E5=B1=95=E7=A4=BA=E4=B8=8D=E5=AE=8C=E6=95=B4=20https:?= =?UTF-8?q?//jira.shanqu.cc/browse/GHZS-1191?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/res/layout/game_collection_banner_item.xml | 1 + .../java/com/gh/gamecenter/common/view/ScaleIndicatorView.kt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/layout/game_collection_banner_item.xml b/app/src/main/res/layout/game_collection_banner_item.xml index 6166c5e6a4..fe724642f1 100644 --- a/app/src/main/res/layout/game_collection_banner_item.xml +++ b/app/src/main/res/layout/game_collection_banner_item.xml @@ -9,6 +9,7 @@ style="@style/frescoStyle" android:layout_width="0dp" android:layout_height="0dp" + app:actualImageScaleType="fitXY" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/module_common/src/main/java/com/gh/gamecenter/common/view/ScaleIndicatorView.kt b/module_common/src/main/java/com/gh/gamecenter/common/view/ScaleIndicatorView.kt index 3d158662ae..2328a42f0d 100644 --- a/module_common/src/main/java/com/gh/gamecenter/common/view/ScaleIndicatorView.kt +++ b/module_common/src/main/java/com/gh/gamecenter/common/view/ScaleIndicatorView.kt @@ -63,9 +63,9 @@ class ScaleIndicatorView : View { mCheckedSliderWidth = ta.getDimensionPixelSize(R.styleable.ScaleIndicatorView_checkedSliderWidth, 10F.dip2px()).toFloat() mSliderHeight = - ta.getDimensionPixelSize(R.styleable.ScaleIndicatorView_normalSliderWidth, 10F.dip2px()).toFloat() + ta.getDimensionPixelSize(R.styleable.ScaleIndicatorView_sliderHeight, 10F.dip2px()).toFloat() mSliderGap = - ta.getDimensionPixelSize(R.styleable.ScaleIndicatorView_normalSliderWidth, 10F.dip2px()).toFloat() + ta.getDimensionPixelSize(R.styleable.ScaleIndicatorView_sliderGap, 10F.dip2px()).toFloat() mNormalColor = ta.getColor(R.styleable.ScaleIndicatorView_normalColor, Color.WHITE) mCheckedColor = ta.getColor(R.styleable.ScaleIndicatorView_checkedColor, Color.WHITE) ta.recycle() From efcff725eec01a9dae66644699b0afbfa137d7f8 Mon Sep 17 00:00:00 2001 From: chenjuntao Date: Wed, 8 Feb 2023 15:24:05 +0800 Subject: [PATCH 17/17] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=95=85?= =?UTF-8?q?=E7=8E=A9=E7=BB=84=E4=BB=B6=E6=B2=A1=E6=9C=89=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E6=97=B6=E7=9A=84=E6=A3=80=E6=B5=8B=E5=AE=89=E8=A3=85=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/gh/vspace/VHelper.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/gh/vspace/VHelper.kt b/app/src/main/java/com/gh/vspace/VHelper.kt index b83636c90c..5769fbbda5 100644 --- a/app/src/main/java/com/gh/vspace/VHelper.kt +++ b/app/src/main/java/com/gh/vspace/VHelper.kt @@ -129,7 +129,7 @@ object VHelper { VArchiveHelper.init() val config = Config.getVSettingEntity()?.va - if (config?.arch64 != null && PackageUtils.isInstalled(context, config.arch64.packageName)) { + if (config?.arch64 != null && PackageUtils.isInstalledFromAllPackage(context, config.arch64.packageName)) { if (isVIsUsed()) { connectService(true) } @@ -222,7 +222,7 @@ object VHelper { */ fun isVSpaceInstalled(context: Context): Boolean { val config = Config.getVSettingEntity()?.va - return config?.arch64 != null && PackageUtils.isInstalled(context, config.arch64.packageName) + return config?.arch64 != null && PackageUtils.isInstalledFromAllPackage(context, config.arch64.packageName) } /**