|
@@ -21,6 +21,7 @@ import com.bumptech.glide.Glide
|
|
|
import com.develop.base.ext.background_color
|
|
|
import com.develop.base.ext.background_drawable
|
|
|
import com.develop.base.ext.getModelNum
|
|
|
+import com.develop.base.ext.getNewTuya
|
|
|
import com.develop.base.ext.getSN
|
|
|
import com.develop.base.ext.globalApp
|
|
|
import com.develop.base.ext.isBrand011A
|
|
@@ -249,7 +250,7 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
|
|
|
if (viewModel.recipesType == RecipesType.ONLINE) {
|
|
|
updateFilterName(viewModel.currCategoryName)
|
|
|
} else {
|
|
|
- if (sn.startsWith("011")) {
|
|
|
+ if (getNewTuya()) {
|
|
|
updateFilterName(viewModel.currCategoryName)
|
|
|
|
|
|
} else {
|
|
@@ -274,7 +275,7 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
|
|
|
|
|
|
//分类名称
|
|
|
val categoryName =
|
|
|
- if (sn.startsWith("011")) viewModel.currCategoryName else model.category
|
|
|
+ if (getNewTuya()) viewModel.currCategoryName else model.category
|
|
|
val tvCategoryName =
|
|
|
findView<AppCompatTextView>(R.id.tv_food_category_name)
|
|
|
if (categoryName != null&&!viewModel.isSearch) {
|
|
@@ -290,7 +291,7 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
|
|
|
/**
|
|
|
* 由于刷新列表,需要在再走一遍创建,故写一个letterPosition 记录位置
|
|
|
* */
|
|
|
- if (!sn.startsWith("011")) {
|
|
|
+ if (!getNewTuya()) {
|
|
|
val letterRv =
|
|
|
findView<RecyclerView>(com.develop.common.R.id.letter_rv)
|
|
|
if (categoryName != null && viewModel.recipesType != RecipesType.ONLINE) {
|
|
@@ -352,7 +353,7 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
|
|
|
val categoryTabViewLayout =
|
|
|
findView<CategoryTabViewLayout>(R.id.category_tab_view)
|
|
|
if (categoryModel != null) {
|
|
|
- if (sn.startsWith("011")){
|
|
|
+ if (getNewTuya()){
|
|
|
categoryTabViewLayout.setGone()
|
|
|
}else{
|
|
|
categoryTabViewLayout.setVisible()
|
|
@@ -432,7 +433,7 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
|
|
|
finishLoadMoreWithNoMoreData()
|
|
|
}
|
|
|
} else {
|
|
|
- if (sn.startsWith("011")){
|
|
|
+ if (getNewTuya()){
|
|
|
viewModel.loadMoreLocal011Recipes()
|
|
|
}else{
|
|
|
if (!viewModel.loadMoreLocalRecipes()) {
|
|
@@ -450,7 +451,7 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
|
|
|
finishLoadMoreWithNoMoreData()
|
|
|
}
|
|
|
} else {
|
|
|
- if (sn.startsWith("011")){
|
|
|
+ if (getNewTuya()){
|
|
|
viewModel.loadMoreLocal011Recipes()
|
|
|
}else{
|
|
|
if (!viewModel.loadMoreLocalRecipes()) {
|
|
@@ -639,7 +640,7 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
|
|
|
if (viewModel.recipesType == RecipesType.ONLINE) {
|
|
|
binding.tvName.updateText(name)
|
|
|
} else {
|
|
|
- if (viewModel.snModel.startsWith("011")) {
|
|
|
+ if (getNewTuya()) {
|
|
|
binding.tvName.updateText(name)
|
|
|
} else {
|
|
|
binding.tvName.updateText("$name($size)")
|
|
@@ -662,7 +663,7 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
|
|
|
binding.itemLayout.setOnClickListener {
|
|
|
//处理011分页问题
|
|
|
//点击分类重新初始 0 页
|
|
|
- if (sn.startsWith("011")){
|
|
|
+ if (getNewTuya()){
|
|
|
viewModel.pageNo = 0
|
|
|
recipesList.clear()
|
|
|
}
|
|
@@ -978,7 +979,7 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
|
|
|
if (viewModel.recipesType == RecipesType.ONLINE) {
|
|
|
updateFilterName(viewModel.currCategoryName)
|
|
|
} else {
|
|
|
- if (sn.startsWith("011")) {
|
|
|
+ if (getNewTuya()) {
|
|
|
updateFilterName(viewModel.currCategoryName)
|
|
|
}
|
|
|
}
|
|
@@ -1065,7 +1066,7 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
|
|
|
} else {
|
|
|
isRefresh = true
|
|
|
binding.page.resetNoMoreData()
|
|
|
- if (sn.startsWith("011")){
|
|
|
+ if (getNewTuya()){
|
|
|
if (viewModel.categoryCode == globalApp().getString(com.develop.common.R.string.all)) {
|
|
|
viewModel.queryLocalRecipes("")
|
|
|
} else {
|