fix: 修复游戏详情切换深色模式出现的闪退问题 https://sentry.shanqu.cc/organizations/lightgame/issues/440241/?project=22&referrer=issue-stream&statsPeriod=14d
This commit is contained in:
@ -923,6 +923,7 @@ class GameDetailFragment : LazyFragment(), IScrollable {
|
||||
// 登录事件/礼包状态变更事件
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onEventMainThread(reuse: EBReuse) {
|
||||
if (!::viewModel.isInitialized) return
|
||||
if (reuse.type == Constants.LOGIN_TAG || (reuse.type == Constants.LIBAO_CHANGED_TAG && !isSupportVisible)) {
|
||||
viewModel.getUserRelatedInfoAndGiftStatus()
|
||||
}
|
||||
@ -931,6 +932,7 @@ class GameDetailFragment : LazyFragment(), IScrollable {
|
||||
// 更新评分
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onEventMainThread(data: EBStar) {
|
||||
if (!::binding.isInitialized) return
|
||||
if (binding.scoreContainer.isVisible) {
|
||||
val showScore = data.commentCount > 3
|
||||
binding.scoreIv.setImageResource(if (showScore) R.drawable.text_game_detail_score else R.drawable.text_game_detail_no_score)
|
||||
@ -996,6 +998,8 @@ class GameDetailFragment : LazyFragment(), IScrollable {
|
||||
|
||||
override fun onDarkModeChanged() {
|
||||
super.onDarkModeChanged()
|
||||
if (!::binding.isInitialized || !::viewModel.isInitialized) return
|
||||
|
||||
binding.coverSfv.run {
|
||||
setIndicatorBackground(com.gh.gamecenter.common.R.drawable.background_shape_white_radius_999.toDrawable(requireContext()))
|
||||
setTextColor(
|
||||
|
||||
Reference in New Issue
Block a user