From 9810b3e8fe795d802b5c2e95e97ed1fa29be4d2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E5=AD=90=E7=BB=B4?= Date: Tue, 30 Jul 2024 16:51:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=B0=E6=B8=B8=E5=BC=80=E6=B5=8B?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96=EF=BC=88?= =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=9C=9F=EF=BC=89-0730=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=AA=8C=E6=94=B6-=E5=AE=A2=E6=88=B7=E7=AB=AF(2)=20https://jir?= =?UTF-8?q?a.shanqu.cc/browse/GHZSCY-6364?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../servers/gametest2/GameServerTestV2Fragment.kt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/gh/gamecenter/servers/gametest2/GameServerTestV2Fragment.kt b/app/src/main/java/com/gh/gamecenter/servers/gametest2/GameServerTestV2Fragment.kt index e3ae1519b7..086dab593a 100644 --- a/app/src/main/java/com/gh/gamecenter/servers/gametest2/GameServerTestV2Fragment.kt +++ b/app/src/main/java/com/gh/gamecenter/servers/gametest2/GameServerTestV2Fragment.kt @@ -36,7 +36,6 @@ class GameServerTestV2Fragment : LazyFragment() { private var mPageLocation: PageLocation? = null private var mTempBigImageMode = true private var mIsSettingAnimating = false - private var mDismissSettingCallback: (() -> Unit)? = null override fun getRealLayoutId(): Int = R.layout.fragment_game_server_test_v2 @@ -69,11 +68,10 @@ class GameServerTestV2Fragment : LazyFragment() { changeFragment() if (SPUtils.getBoolean(Constants.SP_SHOW_GAME_SERVER_TEST_V2_SETTING_GUIDE, true)) { - mDismissSettingCallback = { - showGuidePopupWindow() - } mBaseHandler.post { - showSettingView() + showSettingView { + showGuidePopupWindow() + } } SPUtils.setBoolean(Constants.SP_SHOW_GAME_SERVER_TEST_V2_SETTING_GUIDE, false) } @@ -138,7 +136,7 @@ class GameServerTestV2Fragment : LazyFragment() { } @SuppressLint("ClickableViewAccessibility") - private fun showSettingView() { + private fun showSettingView(onShowAction: (() -> Unit)? = null) { if (mIsSettingAnimating) return mBinding?.dismissView?.visibility = View.VISIBLE @@ -260,6 +258,8 @@ class GameServerTestV2Fragment : LazyFragment() { mIsSettingAnimating = false mBinding?.filterBackground?.visibility = View.GONE mBinding?.filterContainer?.setBackgroundColor(R.color.ui_surface.toColor(requireContext())) + + onShowAction?.invoke() } }.start() } @@ -287,8 +287,6 @@ class GameServerTestV2Fragment : LazyFragment() { mBinding?.dismissView?.visibility = View.GONE mBinding?.filterBackground?.visibility = View.VISIBLE mBinding?.filterContainer?.setBackgroundColor(R.color.ui_background.toColor(requireContext())) - mDismissSettingCallback?.invoke() - mDismissSettingCallback = null mBinding?.settingContainer?.removeAllViews() mSettingBinding = null }