处理 SonarQube 问题
This commit is contained in:
@ -158,7 +158,7 @@ class AmwayFragment : LazyListFragment<AmwayListItemData, AmwayViewModel>() {
|
||||
collapsingToolbar.scrimVisibleHeightTrigger = collapsingTrigger
|
||||
collapsingToolbar.scrimShownAction = {
|
||||
mIsCollapsed = it
|
||||
DisplayUtils.setLightStatusBar(requireActivity(), if (mNightMode) false else it)
|
||||
DisplayUtils.setLightStatusBar(requireActivity(), !mNightMode && it)
|
||||
if (it) {
|
||||
titleTv.alpha = 1F
|
||||
titleTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.text_black))
|
||||
|
||||
@ -488,7 +488,7 @@ class HomeSearchToolWrapperFragment : SearchToolWrapperFragment() {
|
||||
mBinding?.statusBar?.setBackgroundColor(color)
|
||||
mBinding?.tabContainer?.setBackgroundColor(color)
|
||||
|
||||
mSearchToolbarFragment.updateStyle(if (NightModeUtils.isNightMode(requireContext())) true else useLightStyle)
|
||||
mSearchToolbarFragment.updateStyle(NightModeUtils.isNightMode(requireContext()) || useLightStyle)
|
||||
}
|
||||
|
||||
private fun generateTabView(title: String): TabItemMainBinding {
|
||||
|
||||
@ -46,20 +46,16 @@ class GameCollectionSquareAdapter(
|
||||
ListAdapter<GameCollectionListItemData>(context), IExposable {
|
||||
|
||||
fun setAmwayList(amwayList: List<AmwayCommentEntity>) {
|
||||
if (!mEntityList.isNullOrEmpty()) {
|
||||
if (mEntityList[0].amwayListItem == null && isHome) {
|
||||
mEntityList[0].amwayListItem = amwayList
|
||||
notifyItemChanged(0)
|
||||
}
|
||||
if (isHome && mEntityList.isNotEmpty() && mEntityList[0].amwayListItem == null) {
|
||||
mEntityList[0].amwayListItem = amwayList
|
||||
notifyItemChanged(0)
|
||||
}
|
||||
}
|
||||
|
||||
fun setBannerList(bannerList: List<CarouselEntity>) {
|
||||
if (!mEntityList.isNullOrEmpty()) {
|
||||
if (mEntityList[0].carouselListItem == null && isHome) {
|
||||
mEntityList[0].carouselListItem = bannerList
|
||||
notifyItemChanged(0)
|
||||
}
|
||||
if (isHome && mEntityList.isNotEmpty() && mEntityList[0].carouselListItem == null) {
|
||||
mEntityList[0].carouselListItem = bannerList
|
||||
notifyItemChanged(0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -189,7 +189,7 @@ class GameCollectionSquareFragment : LazyListFragment<GamesCollectionEntity, Gam
|
||||
mDefaultBinding.collapsingToolbar.scrimVisibleHeightTrigger = collapsingTrigger
|
||||
mDefaultBinding.collapsingToolbar.scrimShownAction = {
|
||||
mIsCollapsed = it
|
||||
DisplayUtils.setLightStatusBar(requireActivity(), if (mNightMode) false else it)
|
||||
DisplayUtils.setLightStatusBar(requireActivity(), !mNightMode && it)
|
||||
changeToolbarStyle(it)
|
||||
}
|
||||
|
||||
@ -492,7 +492,7 @@ class GameCollectionSquareFragment : LazyListFragment<GamesCollectionEntity, Gam
|
||||
setIndicatorBackground(R.drawable.progressbar_game_collection_primary.toDrawable(requireContext()))
|
||||
setTextColor(ContextCompat.getColorStateList(context, R.color.game_collection_rg_button_selector))
|
||||
}
|
||||
DisplayUtils.setLightStatusBar(requireActivity(), if (mNightMode) false else mIsCollapsed)
|
||||
DisplayUtils.setLightStatusBar(requireActivity(), !mNightMode && mIsCollapsed)
|
||||
changeToolbarStyle(mIsCollapsed)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user