Commit e959df29 by 刘鹏

feat: 抑郁焦虑测试首页问题适配处理,删除无用代码

parent 07bcfd8c
...@@ -14,7 +14,7 @@ buildscript { ...@@ -14,7 +14,7 @@ buildscript {
ydlrouter_version = '1.2.3' ydlrouter_version = '1.2.3'
constrait_support_version = '1.0.2' constrait_support_version = '1.0.2'
componentVersion = "0.3.0.39" componentVersion = "0.3.0.40"
} }
repositories { repositories {
mavenCentral() mavenCentral()
......
...@@ -9,6 +9,7 @@ import android.view.ViewGroup ...@@ -9,6 +9,7 @@ import android.view.ViewGroup
import android.widget.ImageView import android.widget.ImageView
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.ydl.ydl_image.module.GlideApp import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.data.PlatformDataManager
import com.yidianling.home.R import com.yidianling.home.R
import com.yidianling.home.constract.HomeViewConfig import com.yidianling.home.constract.HomeViewConfig
import com.yidianling.home.event.HomeImpl import com.yidianling.home.event.HomeImpl
...@@ -133,7 +134,7 @@ class YdlHomeAdapter(private val mContext: Context, ...@@ -133,7 +134,7 @@ class YdlHomeAdapter(private val mContext: Context,
when (viewType) { when (viewType) {
//顶部ViewPager与分类模块 //顶部ViewPager与分类模块
HomeViewConfig.getOrder().bannerIndex -> { HomeViewConfig.getOrder().bannerIndex -> {
if (viewType == -1){ if (viewType == -1) {
//空布局 //空布局
val view = View(mContext) val view = View(mContext)
val layoutParams = ViewGroup.LayoutParams( val layoutParams = ViewGroup.LayoutParams(
...@@ -141,8 +142,13 @@ class YdlHomeAdapter(private val mContext: Context, ...@@ -141,8 +142,13 @@ class YdlHomeAdapter(private val mContext: Context,
ViewGroup.LayoutParams.MATCH_PARENT ViewGroup.LayoutParams.MATCH_PARENT
) )
view.layoutParams = layoutParams view.layoutParams = layoutParams
//抑郁焦虑测试适配代码
if (PlatformDataManager.getRam().getChannelName().contains("yyjlcs")) {
view.layoutParams =
ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 1)
}
view.visibility = View.GONE view.visibility = View.GONE
return HomePagerBannerViewHolder(view,viewType) return HomePagerBannerViewHolder(view, viewType)
} }
return HomePagerBannerViewHolder(HomePagerBannerView(mContext, homeEvent),viewType) return HomePagerBannerViewHolder(HomePagerBannerView(mContext, homeEvent),viewType)
} }
......
...@@ -20,7 +20,6 @@ import io.reactivex.android.schedulers.AndroidSchedulers ...@@ -20,7 +20,6 @@ import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.functions.Action import io.reactivex.functions.Action
import io.reactivex.functions.Consumer import io.reactivex.functions.Consumer
import io.reactivex.schedulers.Schedulers import io.reactivex.schedulers.Schedulers
import java.util.*
/** /**
...@@ -106,13 +105,6 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract ...@@ -106,13 +105,6 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract
homeList.add(getHomeItemFromTempData(it, HomeViewConfig.getOrder().dynamicIndex!!)) homeList.add(getHomeItemFromTempData(it, HomeViewConfig.getOrder().dynamicIndex!!))
} }
val museObservable = mModel.museRequest()
.compose(RxUtils.applySchedulers(mView)).map {
//首页冥想数据
homeList.add(getHomeItemFromTempData(it, HomeViewConfig.getOrder().museIndex!!))
}
val meditationObservable = mModel.getMeditation() val meditationObservable = mModel.getMeditation()
.compose(RxUtils.applySchedulers(mView)).map { .compose(RxUtils.applySchedulers(mView)).map {
homeList.add(getHomeItemFromTempData(it,HomeViewConfig.getOrder().museIndex!!)) homeList.add(getHomeItemFromTempData(it,HomeViewConfig.getOrder().museIndex!!))
...@@ -159,9 +151,6 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract ...@@ -159,9 +151,6 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract
if (HomeViewConfig.getOrder().museIndex!=null){ if (HomeViewConfig.getOrder().museIndex!=null){
mergeArrays.add(meditationObservable) mergeArrays.add(meditationObservable)
} }
// if (HomeViewConfig.getOrder().museIndex!=null){
// mergeArrays.add(museObservable)
// }
if (HomeViewConfig.getOrder().fmIndex!=null){ if (HomeViewConfig.getOrder().fmIndex!=null){
mergeArrays.add(fmObservable) mergeArrays.add(fmObservable)
} }
...@@ -205,12 +194,6 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract ...@@ -205,12 +194,6 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract
) )
} }
}) })
//长日志打印
// HomeLogPrinter.printLongLog(
// HomePresenterImpl::class.java.simpleName,
// Gson().toJson(homeList)
// )
}) })
} }
...@@ -307,10 +290,6 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract ...@@ -307,10 +290,6 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract
if (dataBean.isRealEmpty || dataBean !is HomeAskBean) homeTempData.askBean else dataBean if (dataBean.isRealEmpty || dataBean !is HomeAskBean) homeTempData.askBean else dataBean
mHomeAskBean = item.askBean mHomeAskBean = item.askBean
} }
// HomeViewConfig.getOrder().museIndex -> {
// item.museBean =
// if (dataBean.isRealEmpty || dataBean !is MuseModuleBean) homeTempData.museBean else dataBean
// }
HomeViewConfig.getOrder().museIndex -> { HomeViewConfig.getOrder().museIndex -> {
item.meditationBean = item.meditationBean =
if (dataBean.isRealEmpty || dataBean !is MeditationModuleBean) homeTempData.meditationBean else dataBean if (dataBean.isRealEmpty || dataBean !is MeditationModuleBean) homeTempData.meditationBean else dataBean
......
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