修复奔溃问题。

This commit is contained in:
Cold-Mint 2023-02-20 10:23:36 +08:00
parent c1c5d8a210
commit 530c50da2b

View File

@ -73,6 +73,7 @@ class InsertCoinsFragment(val modId: String) : BaseFragment<FragmentInsertCoinsB
}
WebMod.instance.getInsertCoinHistory(modId, object : ApiCallBack<InsertCoinHistoryData> {
override fun onResponse(t: InsertCoinHistoryData) {
if (isAdded) {
val dataList = t.data
if (dataList.isNullOrEmpty()) {
viewBinding.recyclerView.isVisible = false
@ -99,6 +100,7 @@ class InsertCoinsFragment(val modId: String) : BaseFragment<FragmentInsertCoinsB
viewBinding.loadLayout.isVisible = false
}
}
}
override fun onFailure(e: Exception) {
e.printStackTrace()