Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
e959df29
Commit
e959df29
authored
Aug 19, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 抑郁焦虑测试首页问题适配处理,删除无用代码
parent
07bcfd8c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
24 deletions
+9
-24
build.gradle
build.gradle
+1
-1
YdlHomeAdapter.kt
m-home/src/ydl/java/com/yidianling/home/adapter/YdlHomeAdapter.kt
+8
-2
HomePresenterImpl.kt
m-home/src/ydl/java/com/yidianling/home/presenter/HomePresenterImpl.kt
+0
-21
No files found.
build.gradle
View file @
e959df29
...
@@ -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
()
...
...
m-home/src/ydl/java/com/yidianling/home/adapter/YdlHomeAdapter.kt
View file @
e959df29
...
@@ -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
)
}
}
...
...
m-home/src/ydl/java/com/yidianling/home/presenter/HomePresenterImpl.kt
View file @
e959df29
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment