Commit 342290e2 by upwork.021

feat: 代码提交

parent cc3b6d32
...@@ -6,7 +6,7 @@ ext { ...@@ -6,7 +6,7 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.49.72", "m-confide" : "0.0.49.72",
"m-consultant" : "0.0.60.56", "m-consultant" : "0.0.60.61",
"m-fm" : "0.0.30.08", "m-fm" : "0.0.30.08",
"m-user" : "0.0.62.04", "m-user" : "0.0.62.04",
"m-home" : "0.0.23.80", "m-home" : "0.0.23.80",
...@@ -92,7 +92,7 @@ ext { ...@@ -92,7 +92,7 @@ ext {
//第三步 若干 //第三步 若干
"m-confide" : "0.0.49.72", "m-confide" : "0.0.49.72",
"m-consultant" : "0.0.60.56", "m-consultant" : "0.0.60.61",
"m-fm" : "0.0.30.08", "m-fm" : "0.0.30.08",
"m-user" : "0.0.62.04", "m-user" : "0.0.62.04",
"m-home" : "0.0.23.41", "m-home" : "0.0.23.41",
......
...@@ -397,7 +397,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -397,7 +397,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
getRouterParam() getRouterParam()
allFilter.showType.key = initShowType allFilter.showType.key = initShowType
if (!TextUtils.isEmpty(initCategory)) { if (!TextUtils.isEmpty(initCategory)&&initCategory!="0") {
allFilter.categoryId2List.add(initCategory) allFilter.categoryId2List.add(initCategory)
} }
if (!TextUtils.isEmpty(cateName)) { if (!TextUtils.isEmpty(cateName)) {
......
...@@ -91,7 +91,7 @@ class ExpertSearchAdapter( ...@@ -91,7 +91,7 @@ class ExpertSearchAdapter(
if (listData[0].is_head_view){ if (listData[0].is_head_view){
if (clickCount==0){ if (clickCount==0){
holder.clSearchWords.visibility = View.VISIBLE holder.clSearchWords.visibility = View.VISIBLE
var text = "根据匹配,为您推荐“${listData[0].related_word}”相关词" var text = "根据匹配,为您推荐“${listData[0].related_word}”的搜索结果"
holder.tvSearchRelatedWord.text = setTextBold(text,listData[0].related_word) holder.tvSearchRelatedWord.text = setTextBold(text,listData[0].related_word)
holder.tvSearchWord.text = listData[0].search_content holder.tvSearchWord.text = listData[0].search_content
// 埋点 // 埋点
......
...@@ -37,6 +37,16 @@ data class AllFilter( ...@@ -37,6 +37,16 @@ data class AllFilter(
// 八大类已选中标签id集合 // 八大类已选中标签id集合
val categoryId2List:ArrayList<String> = ArrayList(), // 一级类目id集合 val categoryId2List:ArrayList<String> = ArrayList(), // 一级类目id集合
val categoryId3List:ArrayList<String> = ArrayList() // 二级类目id集合 val categoryId3List:ArrayList<String> = ArrayList(), // 二级类目id集合
// 八大类选中下标集合,重置的时候可以减少循坏,提升性能
val chooseChildIndexList:ArrayList<Int> = ArrayList(),
val chooseStressIndexList:ArrayList<Int> = ArrayList(),
val chooseLoveEmotionIndexList:ArrayList<Int> = ArrayList(),
val chooseMarriedFamilyIndexList:ArrayList<Int> = ArrayList(),
val choosePersonalGrowthIndexList:ArrayList<Int> = ArrayList(),
val chooseInterpersonalRelationshipIndexList:ArrayList<Int> = ArrayList(),
val chooseCareerDevelopmentIndexList:ArrayList<Int> = ArrayList(),
val chooseMentalHealthIndexList:ArrayList<Int> = ArrayList()
) )
\ No newline at end of file
...@@ -41,15 +41,6 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -41,15 +41,6 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
private val interpersonalRelationshipList = ArrayList<ChildrenBean>() private val interpersonalRelationshipList = ArrayList<ChildrenBean>()
private val careerDevelopmentList = ArrayList<ChildrenBean>() private val careerDevelopmentList = ArrayList<ChildrenBean>()
private val mentalHealthList = ArrayList<ChildrenBean>() private val mentalHealthList = ArrayList<ChildrenBean>()
// 记录每个大类标签选择的位置,重置的时候可以减少循坏,提升性能
private val chooseChildIndexList = ArrayList<Int>()
private val chooseStressIndexList = ArrayList<Int>()
private val chooseLoveEmotionIndexList = ArrayList<Int>()
private val chooseMarriedFamilyIndexList = ArrayList<Int>()
private val choosePersonalGrowthIndexList = ArrayList<Int>()
private val chooseInterpersonalRelationshipIndexList = ArrayList<Int>()
private val chooseCareerDevelopmentIndexList = ArrayList<Int>()
private val chooseMentalHealthIndexList = ArrayList<Int>()
private val signList = ArrayList<String>() // 用于埋点 private val signList = ArrayList<String>() // 用于埋点
private lateinit var childEducationAdapter:SortAdapter private lateinit var childEducationAdapter:SortAdapter
private lateinit var stressAdapter:SortAdapter private lateinit var stressAdapter:SortAdapter
...@@ -75,57 +66,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -75,57 +66,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
inputMethodMode = INPUT_METHOD_NEEDED inputMethodMode = INPUT_METHOD_NEEDED
// 重置 // 重置
view.btn_reset.setOnClickListener { view.btn_reset.setOnClickListener {
if (chooseChildIndexList.size>0){ reset()
chooseChildIndexList.forEach {
childList[it].isSelected = false
}
childEducationAdapter.notifyDataSetChanged()
}
if (chooseStressIndexList.size>0){
chooseStressIndexList.forEach{
stressList[it].isSelected = false
}
stressAdapter.notifyDataSetChanged()
}
if (chooseLoveEmotionIndexList.size>0){
chooseLoveEmotionIndexList.forEach {
loveEmotionList[it].isSelected = false
}
loveEmotionAdapter.notifyDataSetChanged()
}
if (chooseMarriedFamilyIndexList.size>0){
chooseMarriedFamilyIndexList.forEach {
marriedFamilyList[it].isSelected = false
}
marriedFamilyAdapter.notifyDataSetChanged()
}
if (choosePersonalGrowthIndexList.size>0){
choosePersonalGrowthIndexList.forEach{
personalGrowthList[it].isSelected = false
}
personalGrowthAdapter.notifyDataSetChanged()
}
if (chooseInterpersonalRelationshipIndexList.size>0){
chooseInterpersonalRelationshipIndexList.forEach {
interpersonalRelationshipList[it].isSelected = false
}
interpersonalRelationshipAdapter.notifyDataSetChanged()
}
if (chooseCareerDevelopmentIndexList.size>0){
chooseCareerDevelopmentIndexList.forEach {
careerDevelopmentList[it].isSelected = false
}
careerDevelopmentAdapter.notifyDataSetChanged()
}
if (chooseMentalHealthIndexList.size>0){
chooseMentalHealthIndexList.forEach {
mentalHealthList[it].isSelected = false
}
mentalHealthAdapter.notifyDataSetChanged()
}
mAllFilter.categoryId2List.clear()
mAllFilter.categoryId3List.clear()
signList.clear()
} }
// 确定 // 确定
view.btnConfirm.setOnClickListener { view.btnConfirm.setOnClickListener {
...@@ -143,7 +84,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -143,7 +84,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (childList[0].isSelected){ if (childList[0].isSelected){
childList[0].isSelected = false childList[0].isSelected = false
mAllFilter.categoryId2List.remove(childList[0].cate_id) mAllFilter.categoryId2List.remove(childList[0].cate_id)
chooseChildIndexList.remove(position) mAllFilter.chooseChildIndexList.remove(position)
signList.remove("亲子教育") signList.remove("亲子教育")
}else{ }else{
childList.forEachIndexed { index, _ -> childList.forEachIndexed { index, _ ->
...@@ -156,7 +97,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -156,7 +97,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
signList.remove(childList[index].cate_name) signList.remove(childList[index].cate_name)
} }
} }
chooseChildIndexList.add(position) mAllFilter.chooseChildIndexList.add(position)
} }
}else{ }else{
if (!childList[position].isSelected&&childList[0].isSelected){ if (!childList[position].isSelected&&childList[0].isSelected){
...@@ -167,11 +108,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -167,11 +108,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
childList[position].isSelected = !childList[position].isSelected childList[position].isSelected = !childList[position].isSelected
if (childList[position].isSelected){ if (childList[position].isSelected){
mAllFilter.categoryId3List.add(childList[position].cate_id) mAllFilter.categoryId3List.add(childList[position].cate_id)
chooseChildIndexList.add(position) mAllFilter.chooseChildIndexList.add(position)
signList.add(childList[position].cate_name) signList.add(childList[position].cate_name)
}else{ }else{
mAllFilter.categoryId3List.remove(childList[position].cate_id) mAllFilter.categoryId3List.remove(childList[position].cate_id)
chooseChildIndexList.remove(position) mAllFilter.chooseChildIndexList.remove(position)
signList.remove(childList[position].cate_name) signList.remove(childList[position].cate_name)
} }
} }
...@@ -188,7 +129,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -188,7 +129,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (stressList[0].isSelected){ if (stressList[0].isSelected){
stressList[0].isSelected = false stressList[0].isSelected = false
mAllFilter.categoryId2List.remove(stressList[0].cate_id) mAllFilter.categoryId2List.remove(stressList[0].cate_id)
chooseStressIndexList.remove(position) mAllFilter.chooseStressIndexList.remove(position)
signList.remove("情绪压力") signList.remove("情绪压力")
}else{ }else{
stressList.forEachIndexed { index, _ -> stressList.forEachIndexed { index, _ ->
...@@ -201,7 +142,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -201,7 +142,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
signList.remove(stressList[index].cate_name) signList.remove(stressList[index].cate_name)
} }
} }
chooseStressIndexList.add(position) mAllFilter.chooseStressIndexList.add(position)
} }
}else{ }else{
if (!stressList[position].isSelected&&stressList[0].isSelected){ if (!stressList[position].isSelected&&stressList[0].isSelected){
...@@ -212,11 +153,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -212,11 +153,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
stressList[position].isSelected = !stressList[position].isSelected stressList[position].isSelected = !stressList[position].isSelected
if (stressList[position].isSelected){ if (stressList[position].isSelected){
mAllFilter.categoryId3List.add(stressList[position].cate_id) mAllFilter.categoryId3List.add(stressList[position].cate_id)
chooseStressIndexList.add(position) mAllFilter.chooseStressIndexList.add(position)
signList.add(stressList[position].cate_name) signList.add(stressList[position].cate_name)
}else{ }else{
mAllFilter.categoryId3List.remove(stressList[position].cate_id) mAllFilter.categoryId3List.remove(stressList[position].cate_id)
chooseStressIndexList.remove(position) mAllFilter.chooseStressIndexList.remove(position)
signList.remove(stressList[position].cate_name) signList.remove(stressList[position].cate_name)
} }
} }
...@@ -233,7 +174,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -233,7 +174,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (loveEmotionList[0].isSelected){ if (loveEmotionList[0].isSelected){
loveEmotionList[0].isSelected = false loveEmotionList[0].isSelected = false
mAllFilter.categoryId2List.remove(loveEmotionList[0].cate_id) mAllFilter.categoryId2List.remove(loveEmotionList[0].cate_id)
chooseLoveEmotionIndexList.remove(position) mAllFilter.chooseLoveEmotionIndexList.remove(position)
signList.remove("恋爱情感") signList.remove("恋爱情感")
}else{ }else{
loveEmotionList.forEachIndexed { index, _ -> loveEmotionList.forEachIndexed { index, _ ->
...@@ -246,7 +187,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -246,7 +187,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
signList.remove(loveEmotionList[index].cate_name) signList.remove(loveEmotionList[index].cate_name)
} }
} }
chooseLoveEmotionIndexList.add(position) mAllFilter.chooseLoveEmotionIndexList.add(position)
} }
}else{ }else{
if (!loveEmotionList[position].isSelected&&loveEmotionList[0].isSelected){ if (!loveEmotionList[position].isSelected&&loveEmotionList[0].isSelected){
...@@ -257,11 +198,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -257,11 +198,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
loveEmotionList[position].isSelected = !loveEmotionList[position].isSelected loveEmotionList[position].isSelected = !loveEmotionList[position].isSelected
if (loveEmotionList[position].isSelected){ if (loveEmotionList[position].isSelected){
mAllFilter.categoryId3List.add(loveEmotionList[position].cate_id) mAllFilter.categoryId3List.add(loveEmotionList[position].cate_id)
chooseLoveEmotionIndexList.add(position) mAllFilter.chooseLoveEmotionIndexList.add(position)
signList.add(loveEmotionList[position].cate_name) signList.add(loveEmotionList[position].cate_name)
}else{ }else{
mAllFilter.categoryId3List.remove(loveEmotionList[position].cate_id) mAllFilter.categoryId3List.remove(loveEmotionList[position].cate_id)
chooseLoveEmotionIndexList.remove(position) mAllFilter.chooseLoveEmotionIndexList.remove(position)
signList.remove(loveEmotionList[position].cate_name) signList.remove(loveEmotionList[position].cate_name)
} }
} }
...@@ -278,7 +219,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -278,7 +219,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (marriedFamilyList[0].isSelected){ if (marriedFamilyList[0].isSelected){
marriedFamilyList[0].isSelected = false marriedFamilyList[0].isSelected = false
mAllFilter.categoryId2List.remove(marriedFamilyList[0].cate_id) mAllFilter.categoryId2List.remove(marriedFamilyList[0].cate_id)
chooseMarriedFamilyIndexList.remove(position) mAllFilter.chooseMarriedFamilyIndexList.remove(position)
signList.remove("婚姻家庭") signList.remove("婚姻家庭")
}else{ }else{
marriedFamilyList.forEachIndexed { index, _ -> marriedFamilyList.forEachIndexed { index, _ ->
...@@ -291,7 +232,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -291,7 +232,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
signList.remove(marriedFamilyList[index].cate_name) signList.remove(marriedFamilyList[index].cate_name)
} }
} }
chooseMarriedFamilyIndexList.add(position) mAllFilter.chooseMarriedFamilyIndexList.add(position)
} }
}else{ }else{
if (!marriedFamilyList[position].isSelected&&marriedFamilyList[0].isSelected){ if (!marriedFamilyList[position].isSelected&&marriedFamilyList[0].isSelected){
...@@ -302,11 +243,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -302,11 +243,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
marriedFamilyList[position].isSelected = !marriedFamilyList[position].isSelected marriedFamilyList[position].isSelected = !marriedFamilyList[position].isSelected
if (marriedFamilyList[position].isSelected){ if (marriedFamilyList[position].isSelected){
mAllFilter.categoryId3List.add(marriedFamilyList[position].cate_id) mAllFilter.categoryId3List.add(marriedFamilyList[position].cate_id)
chooseMarriedFamilyIndexList.add(position) mAllFilter.chooseMarriedFamilyIndexList.add(position)
signList.add(marriedFamilyList[position].cate_name) signList.add(marriedFamilyList[position].cate_name)
}else{ }else{
mAllFilter.categoryId3List.remove(marriedFamilyList[position].cate_id) mAllFilter.categoryId3List.remove(marriedFamilyList[position].cate_id)
chooseMarriedFamilyIndexList.remove(position) mAllFilter.chooseMarriedFamilyIndexList.remove(position)
signList.remove(marriedFamilyList[position].cate_name) signList.remove(marriedFamilyList[position].cate_name)
} }
} }
...@@ -323,7 +264,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -323,7 +264,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (personalGrowthList[0].isSelected){ if (personalGrowthList[0].isSelected){
personalGrowthList[0].isSelected = false personalGrowthList[0].isSelected = false
mAllFilter.categoryId2List.remove(personalGrowthList[0].cate_id) mAllFilter.categoryId2List.remove(personalGrowthList[0].cate_id)
choosePersonalGrowthIndexList.remove(position) mAllFilter.choosePersonalGrowthIndexList.remove(position)
signList.remove("个人成长") signList.remove("个人成长")
}else{ }else{
personalGrowthList.forEachIndexed { index, _ -> personalGrowthList.forEachIndexed { index, _ ->
...@@ -336,7 +277,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -336,7 +277,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
signList.remove(personalGrowthList[index].cate_name) signList.remove(personalGrowthList[index].cate_name)
} }
} }
choosePersonalGrowthIndexList.add(position) mAllFilter.choosePersonalGrowthIndexList.add(position)
} }
}else{ }else{
if (!personalGrowthList[position].isSelected&&personalGrowthList[0].isSelected){ if (!personalGrowthList[position].isSelected&&personalGrowthList[0].isSelected){
...@@ -347,11 +288,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -347,11 +288,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
personalGrowthList[position].isSelected = !personalGrowthList[position].isSelected personalGrowthList[position].isSelected = !personalGrowthList[position].isSelected
if (personalGrowthList[position].isSelected){ if (personalGrowthList[position].isSelected){
mAllFilter.categoryId3List.add(personalGrowthList[position].cate_id) mAllFilter.categoryId3List.add(personalGrowthList[position].cate_id)
choosePersonalGrowthIndexList.add(position) mAllFilter.choosePersonalGrowthIndexList.add(position)
signList.add(personalGrowthList[position].cate_name) signList.add(personalGrowthList[position].cate_name)
}else{ }else{
mAllFilter.categoryId3List.remove(personalGrowthList[position].cate_id) mAllFilter.categoryId3List.remove(personalGrowthList[position].cate_id)
choosePersonalGrowthIndexList.remove(position) mAllFilter.choosePersonalGrowthIndexList.remove(position)
signList.remove(personalGrowthList[position].cate_name) signList.remove(personalGrowthList[position].cate_name)
} }
} }
...@@ -368,7 +309,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -368,7 +309,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (interpersonalRelationshipList[0].isSelected){ if (interpersonalRelationshipList[0].isSelected){
interpersonalRelationshipList[0].isSelected = false interpersonalRelationshipList[0].isSelected = false
mAllFilter.categoryId2List.remove(interpersonalRelationshipList[0].cate_id) mAllFilter.categoryId2List.remove(interpersonalRelationshipList[0].cate_id)
chooseInterpersonalRelationshipIndexList.remove(position) mAllFilter.chooseInterpersonalRelationshipIndexList.remove(position)
signList.remove("人际关系") signList.remove("人际关系")
}else{ }else{
interpersonalRelationshipList.forEachIndexed { index, _ -> interpersonalRelationshipList.forEachIndexed { index, _ ->
...@@ -381,7 +322,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -381,7 +322,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
signList.remove(interpersonalRelationshipList[index].cate_name) signList.remove(interpersonalRelationshipList[index].cate_name)
} }
} }
chooseInterpersonalRelationshipIndexList.add(position) mAllFilter.chooseInterpersonalRelationshipIndexList.add(position)
} }
}else{ }else{
if (!interpersonalRelationshipList[position].isSelected&&interpersonalRelationshipList[0].isSelected){ if (!interpersonalRelationshipList[position].isSelected&&interpersonalRelationshipList[0].isSelected){
...@@ -392,11 +333,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -392,11 +333,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
interpersonalRelationshipList[position].isSelected = !interpersonalRelationshipList[position].isSelected interpersonalRelationshipList[position].isSelected = !interpersonalRelationshipList[position].isSelected
if (interpersonalRelationshipList[position].isSelected){ if (interpersonalRelationshipList[position].isSelected){
mAllFilter.categoryId3List.add(interpersonalRelationshipList[position].cate_id) mAllFilter.categoryId3List.add(interpersonalRelationshipList[position].cate_id)
chooseInterpersonalRelationshipIndexList.add(position) mAllFilter.chooseInterpersonalRelationshipIndexList.add(position)
signList.add(interpersonalRelationshipList[position].cate_name) signList.add(interpersonalRelationshipList[position].cate_name)
}else{ }else{
mAllFilter.categoryId3List.remove(interpersonalRelationshipList[position].cate_id) mAllFilter.categoryId3List.remove(interpersonalRelationshipList[position].cate_id)
chooseInterpersonalRelationshipIndexList.remove(position) mAllFilter.chooseInterpersonalRelationshipIndexList.remove(position)
signList.remove(interpersonalRelationshipList[position].cate_name) signList.remove(interpersonalRelationshipList[position].cate_name)
} }
} }
...@@ -413,7 +354,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -413,7 +354,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (careerDevelopmentList[0].isSelected){ if (careerDevelopmentList[0].isSelected){
careerDevelopmentList[0].isSelected = false careerDevelopmentList[0].isSelected = false
mAllFilter.categoryId2List.remove(childList[0].cate_id) mAllFilter.categoryId2List.remove(childList[0].cate_id)
chooseCareerDevelopmentIndexList.remove(position) mAllFilter.chooseCareerDevelopmentIndexList.remove(position)
signList.remove("职场发展") signList.remove("职场发展")
}else{ }else{
careerDevelopmentList.forEachIndexed { index, _ -> careerDevelopmentList.forEachIndexed { index, _ ->
...@@ -426,7 +367,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -426,7 +367,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
signList.remove(careerDevelopmentList[index].cate_name) signList.remove(careerDevelopmentList[index].cate_name)
} }
} }
chooseCareerDevelopmentIndexList.add(position) mAllFilter.chooseCareerDevelopmentIndexList.add(position)
} }
}else{ }else{
if (!careerDevelopmentList[position].isSelected&&careerDevelopmentList[0].isSelected){ if (!careerDevelopmentList[position].isSelected&&careerDevelopmentList[0].isSelected){
...@@ -437,11 +378,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -437,11 +378,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
careerDevelopmentList[position].isSelected = !careerDevelopmentList[position].isSelected careerDevelopmentList[position].isSelected = !careerDevelopmentList[position].isSelected
if (careerDevelopmentList[position].isSelected){ if (careerDevelopmentList[position].isSelected){
mAllFilter.categoryId3List.add(careerDevelopmentList[position].cate_id) mAllFilter.categoryId3List.add(careerDevelopmentList[position].cate_id)
chooseCareerDevelopmentIndexList.add(position) mAllFilter.chooseCareerDevelopmentIndexList.add(position)
signList.add(careerDevelopmentList[position].cate_name) signList.add(careerDevelopmentList[position].cate_name)
}else{ }else{
mAllFilter.categoryId3List.remove(careerDevelopmentList[position].cate_id) mAllFilter.categoryId3List.remove(careerDevelopmentList[position].cate_id)
chooseCareerDevelopmentIndexList.remove(position) mAllFilter.chooseCareerDevelopmentIndexList.remove(position)
signList.remove(careerDevelopmentList[position].cate_name) signList.remove(careerDevelopmentList[position].cate_name)
} }
} }
...@@ -458,7 +399,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -458,7 +399,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (mentalHealthList[0].isSelected){ if (mentalHealthList[0].isSelected){
mentalHealthList[0].isSelected = false mentalHealthList[0].isSelected = false
mAllFilter.categoryId2List.remove(mentalHealthList[0].cate_id) mAllFilter.categoryId2List.remove(mentalHealthList[0].cate_id)
chooseMentalHealthIndexList.remove(position) mAllFilter.chooseMentalHealthIndexList.remove(position)
signList.remove("心理健康") signList.remove("心理健康")
}else{ }else{
mentalHealthList.forEachIndexed { index, _ -> mentalHealthList.forEachIndexed { index, _ ->
...@@ -471,7 +412,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -471,7 +412,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
signList.remove(mentalHealthList[index].cate_name) signList.remove(mentalHealthList[index].cate_name)
} }
} }
chooseMentalHealthIndexList.add(position) mAllFilter.chooseMentalHealthIndexList.add(position)
} }
}else{ }else{
if (!mentalHealthList[position].isSelected&&mentalHealthList[0].isSelected){ if (!mentalHealthList[position].isSelected&&mentalHealthList[0].isSelected){
...@@ -482,11 +423,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -482,11 +423,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
mentalHealthList[position].isSelected = !mentalHealthList[position].isSelected mentalHealthList[position].isSelected = !mentalHealthList[position].isSelected
if (mentalHealthList[position].isSelected){ if (mentalHealthList[position].isSelected){
mAllFilter.categoryId3List.add(mentalHealthList[position].cate_id) mAllFilter.categoryId3List.add(mentalHealthList[position].cate_id)
chooseMentalHealthIndexList.add(position) mAllFilter.chooseMentalHealthIndexList.add(position)
signList.add(mentalHealthList[position].cate_name) signList.add(mentalHealthList[position].cate_name)
}else{ }else{
mAllFilter.categoryId3List.remove(mentalHealthList[position].cate_id) mAllFilter.categoryId3List.remove(mentalHealthList[position].cate_id)
chooseMentalHealthIndexList.remove(position) mAllFilter.chooseMentalHealthIndexList.remove(position)
signList.remove(mentalHealthList[position].cate_name) signList.remove(mentalHealthList[position].cate_name)
} }
} }
...@@ -693,4 +634,61 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -693,4 +634,61 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
} }
} }
} }
/**
* 重置
*/
fun reset(){
if (mAllFilter.chooseChildIndexList.size>0){
mAllFilter.chooseChildIndexList.forEach {
childList[it].isSelected = false
}
childEducationAdapter.notifyDataSetChanged()
}
if (mAllFilter.chooseStressIndexList.size>0){
mAllFilter.chooseStressIndexList.forEach{
stressList[it].isSelected = false
}
stressAdapter.notifyDataSetChanged()
}
if (mAllFilter.chooseLoveEmotionIndexList.size>0){
mAllFilter.chooseLoveEmotionIndexList.forEach {
loveEmotionList[it].isSelected = false
}
loveEmotionAdapter.notifyDataSetChanged()
}
if (mAllFilter.chooseMarriedFamilyIndexList.size>0){
mAllFilter.chooseMarriedFamilyIndexList.forEach {
marriedFamilyList[it].isSelected = false
}
marriedFamilyAdapter.notifyDataSetChanged()
}
if (mAllFilter.choosePersonalGrowthIndexList.size>0){
mAllFilter.choosePersonalGrowthIndexList.forEach{
personalGrowthList[it].isSelected = false
}
personalGrowthAdapter.notifyDataSetChanged()
}
if (mAllFilter.chooseInterpersonalRelationshipIndexList.size>0){
mAllFilter.chooseInterpersonalRelationshipIndexList.forEach {
interpersonalRelationshipList[it].isSelected = false
}
interpersonalRelationshipAdapter.notifyDataSetChanged()
}
if (mAllFilter.chooseCareerDevelopmentIndexList.size>0){
mAllFilter.chooseCareerDevelopmentIndexList.forEach {
careerDevelopmentList[it].isSelected = false
}
careerDevelopmentAdapter.notifyDataSetChanged()
}
if (mAllFilter.chooseMentalHealthIndexList.size>0){
mAllFilter.chooseMentalHealthIndexList.forEach {
mentalHealthList[it].isSelected = false
}
mentalHealthAdapter.notifyDataSetChanged()
}
mAllFilter.categoryId2List.clear()
mAllFilter.categoryId3List.clear()
signList.clear()
}
} }
\ No newline at end of file
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