Commit 47e43179 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 3b22fff6
...@@ -145,6 +145,8 @@ class DrawProgressActivity : BaseActivity(), View.OnClickListener { ...@@ -145,6 +145,8 @@ class DrawProgressActivity : BaseActivity(), View.OnClickListener {
tempAdProgress = tempAdProgress + 1 tempAdProgress = tempAdProgress + 1
Handler(Looper.getMainLooper()).postDelayed({ Handler(Looper.getMainLooper()).postDelayed({
if(isFinishing) return@postDelayed
val showProgress = progress + tempAdProgress val showProgress = progress + tempAdProgress
pb_draw_progress.progress = showProgress pb_draw_progress.progress = showProgress
pb_draw_progress.max = max pb_draw_progress.max = max
......
...@@ -97,6 +97,8 @@ class NineActivity : BaseActivity(), View.OnClickListener { ...@@ -97,6 +97,8 @@ class NineActivity : BaseActivity(), View.OnClickListener {
AppConfig.mainMusicRefresh=true AppConfig.mainMusicRefresh=true
refreshTaskCount() refreshTaskCount()
Handler(Looper.getMainLooper()).postDelayed({ Handler(Looper.getMainLooper()).postDelayed({
if(isFinishing) return@postDelayed
finish() finish()
}, 500) }, 500)
} }
...@@ -172,6 +174,8 @@ class NineActivity : BaseActivity(), View.OnClickListener { ...@@ -172,6 +174,8 @@ class NineActivity : BaseActivity(), View.OnClickListener {
*/ */
private fun adCloseNext(carrierType: String) { private fun adCloseNext(carrierType: String) {
Handler(Looper.getMainLooper()).postDelayed({ Handler(Looper.getMainLooper()).postDelayed({
if(isFinishing) return@postDelayed
startNine() startNine()
}, 500) }, 500)
} }
...@@ -194,6 +198,8 @@ class NineActivity : BaseActivity(), View.OnClickListener { ...@@ -194,6 +198,8 @@ class NineActivity : BaseActivity(), View.OnClickListener {
lucky_panel2.tryToStop(5) lucky_panel2.tryToStop(5)
Handler(Looper.getMainLooper()).postDelayed({ Handler(Looper.getMainLooper()).postDelayed({
if(isFinishing) return@postDelayed
showWithdrawSucDialog(0.0) showWithdrawSucDialog(0.0)
}, 2000) }, 2000)
} }
......
...@@ -179,6 +179,8 @@ class SettingsActivity : BaseActivity(), View.OnClickListener { ...@@ -179,6 +179,8 @@ class SettingsActivity : BaseActivity(), View.OnClickListener {
ToastUtil.show(this@SettingsActivity, "注销账户申请已发起!") ToastUtil.show(this@SettingsActivity, "注销账户申请已发起!")
Handler(Looper.getMainLooper()).postDelayed({ Handler(Looper.getMainLooper()).postDelayed({
if(isFinishing) return@postDelayed
finish() finish()
}, 200) }, 200)
......
...@@ -312,13 +312,18 @@ class DrawCashFragment : LazyLoadBaseFragment(), DrawCashView, DrawCashAdapter.O ...@@ -312,13 +312,18 @@ class DrawCashFragment : LazyLoadBaseFragment(), DrawCashView, DrawCashAdapter.O
Constant.CARRIERTYPE_ONLY_SHOW -> { Constant.CARRIERTYPE_ONLY_SHOW -> {
TrackManager.getInstance().addCashoutReq(currentDrawInfo?.unitId) TrackManager.getInstance().addCashoutReq(currentDrawInfo?.unitId)
Handler(Looper.getMainLooper()).postDelayed({ Handler(Looper.getMainLooper()).postDelayed({
if(!isAdded) return@postDelayed
showToast("发起提现成功") showToast("发起提现成功")
}, 1000) }, 1000)
} }
Constant.CARRIERTYPE_REWARD_COIN -> { Constant.CARRIERTYPE_REWARD_COIN -> {
Handler(Looper.getMainLooper()).postDelayed({ Handler(Looper.getMainLooper()).postDelayed({
if(!isAdded) return@postDelayed
Handler(Looper.getMainLooper()).postDelayed({ Handler(Looper.getMainLooper()).postDelayed({
if(!isAdded) return@postDelayed
ConsumerToastUtil.showAwardText(requireContext(), AppConfig.awardRedpkg, 0) ConsumerToastUtil.showAwardText(requireContext(), AppConfig.awardRedpkg, 0)
}, 800) }, 800)
...@@ -327,7 +332,10 @@ class DrawCashFragment : LazyLoadBaseFragment(), DrawCashView, DrawCashAdapter.O ...@@ -327,7 +332,10 @@ class DrawCashFragment : LazyLoadBaseFragment(), DrawCashView, DrawCashAdapter.O
} }
Constant.CARRIERTYPE_REWARD_DI -> { Constant.CARRIERTYPE_REWARD_DI -> {
Handler(Looper.getMainLooper()).postDelayed({ Handler(Looper.getMainLooper()).postDelayed({
if(!isAdded) return@postDelayed
Handler(Looper.getMainLooper()).postDelayed({ Handler(Looper.getMainLooper()).postDelayed({
if(!isAdded) return@postDelayed
ConsumerToastUtil.showAwardText(requireContext(), 0, AppConfig.awardYuanbao) ConsumerToastUtil.showAwardText(requireContext(), 0, AppConfig.awardYuanbao)
}, 800) }, 800)
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
android:layout_marginLeft="30dp" android:layout_marginLeft="30dp"
android:layout_marginRight="30dp" android:layout_marginRight="30dp"
android:gravity="center" android:gravity="center"
android:text="Copyright © 2020 Inc." android:text="Copyright © 2023 Inc."
android:textColor="#454A69" android:textColor="#454A69"
android:textSize="12sp" /> android:textSize="12sp" />
</LinearLayout> </LinearLayout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment