|
@@ -85,46 +85,46 @@ class CookEvaluateActivity : CommonBindingActivity<ActivityCookEvaluateBinding>(
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- safeGlobalScope.launch(Dispatchers.IO) {
|
|
|
|
- val userTag = FoodDataProvider.getUserDatabase().userInfoDao().queryUserTag(
|
|
|
|
- CURRENT_USER_ID, recipeId ?: ""
|
|
|
|
- )
|
|
|
|
- val recipes = FoodDataProvider.getDatabase().recipeDao().queryRecipe(recipeId)
|
|
|
|
- val count1 = userTag?.starCount ?: 0
|
|
|
|
- val count2 = recipes?.score?.toInt() ?: 0
|
|
|
|
- starCount = if (count1 != 0) {
|
|
|
|
- count1
|
|
|
|
- } else if (count2 != 0) {
|
|
|
|
- count2
|
|
|
|
- } else {
|
|
|
|
- 0
|
|
|
|
- }
|
|
|
|
- withMain {
|
|
|
|
- selectStar(starCount)
|
|
|
|
- when (starCount) {
|
|
|
|
- 1 -> {
|
|
|
|
- binding.tvGood.text = getString(R.string.bad)
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- 2 -> {
|
|
|
|
- binding.tvGood.text = getString(R.string.imperfect)
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- 3 -> {
|
|
|
|
- binding.tvGood.text = getString(R.string.ordinary)
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- 4 -> {
|
|
|
|
- binding.tvGood.text = getString(R.string.good)
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- 5 -> {
|
|
|
|
- binding.tvGood.text = getString(R.string.perfect)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- binding.etContent.setText(userTag?.daily)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+// safeGlobalScope.launch(Dispatchers.IO) {
|
|
|
|
+// val userTag = FoodDataProvider.getUserDatabase().userInfoDao().queryUserTag(
|
|
|
|
+// CURRENT_USER_ID, recipeId ?: ""
|
|
|
|
+// )
|
|
|
|
+// val recipes = FoodDataProvider.getDatabase().recipeDao().queryRecipe(recipeId)
|
|
|
|
+// val count1 = userTag?.starCount ?: 0
|
|
|
|
+// val count2 = recipes?.score?.toInt() ?: 0
|
|
|
|
+// starCount = if (count1 != 0) {
|
|
|
|
+// count1
|
|
|
|
+// } else if (count2 != 0) {
|
|
|
|
+// count2
|
|
|
|
+// } else {
|
|
|
|
+// 0
|
|
|
|
+// }
|
|
|
|
+// withMain {
|
|
|
|
+// selectStar(starCount)
|
|
|
|
+// when (starCount) {
|
|
|
|
+// 1 -> {
|
|
|
|
+// binding.tvGood.text = getString(R.string.bad)
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// 2 -> {
|
|
|
|
+// binding.tvGood.text = getString(R.string.imperfect)
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// 3 -> {
|
|
|
|
+// binding.tvGood.text = getString(R.string.ordinary)
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// 4 -> {
|
|
|
|
+// binding.tvGood.text = getString(R.string.good)
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// 5 -> {
|
|
|
|
+// binding.tvGood.text = getString(R.string.perfect)
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// binding.etContent.setText(userTag?.daily)
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
|
|
|
|
|
|
binding.tvOk.setOnClickListener {
|
|
binding.tvOk.setOnClickListener {
|