Browse Source

提交人:江天明
提交内容:优化

江天明 11 months ago
parent
commit
e740ce22e5

+ 2 - 0
BusinessMain/src/main/java/com/develop/main/init/ui/adapter/RecipesListAdapter.kt

@@ -16,6 +16,7 @@ import com.develop.food.base.repo.FoodDataProvider
 import com.develop.food.base.repo.entity.UserFavoriteRecipes
 import com.develop.food.base.utils.ResDimension
 import com.develop.food.base.utils.TopResumedActivityHolder
+import com.develop.food.base.utils.setVisible
 import com.develop.food.base.widgets.CancelConfirmDialog
 import com.develop.food.base.widgets.MarqueeTextView
 import com.develop.food.base.widgets.StarView
@@ -44,6 +45,7 @@ class RecipesListAdapter :
         holder.getView<MarqueeTextView>(R.id.tv_food_name).text = item.foodName
         holder.getView<StarView>(R.id.star_view).setStarCount(item.starCount)
         val likeLayout = holder.getView<RelativeLayout>(R.id.like_layout)
+        likeLayout.setVisible()
         val ivLike = holder.getView<ImageView>(R.id.iv_like)
         holder.getView<AppCompatTextView>(R.id.tv_time_and_level).text =
             "${item.time}・${item.level}"

+ 1 - 1
BusinessStep/src/main/java/com/develop/step/details/CookDetailViewModel.kt

@@ -196,7 +196,7 @@ class CookDetailViewModel(application: Application) : AndroidViewModel(applicati
             }
             val jsonContent = FileKit.readFileToStringB(jsonFile)
             val contentData = Gson().fromJson(jsonContent, RecipeDataConfig::class.java)
-            //contentData.resetAllCodes()
+            contentData.resetAllCodes()
             FoodDataProvider.getDatabase().runInTransaction {
                 FoodDataProvider.getDatabase().recipeDao().apply {
                     val categorys = queryAllCategory()