Commit ea54734e by 刘鹏

Merge branch 'fix/lp/lp_fix_home_tabindex' into 'd/v4.4.08'

feat: 修复首页tab切换崩溃问题

See merge request app_android_lib/YDL-Component!327
parents 4f8ada71 113a3a56
......@@ -23,7 +23,9 @@ import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydlcommon.base.BaseMvpFragment
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.*
import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.Utils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.consultant.OnBottomWordListener
import com.yidianling.consultant.api.IConsultantService
......@@ -698,7 +700,11 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
}
textView.typeface = Typeface.defaultFromStyle(Typeface.BOLD)
}
list?.get(tab.position)?.let { homeEvent?.getConfideData(it, tab.position) }
val minus = list?.size ?: -1
if (minus != -1 && tab.position < minus) {
list?.get(tab.position)?.let { homeEvent?.getConfideData(it, tab.position) }
}
}
}
......
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