|
@@ -40,9 +40,11 @@ import com.develop.common.R
|
|
|
import com.develop.common.bean.CfConfig
|
|
|
import com.develop.common.bean.WorkMode
|
|
|
import com.develop.common.data_repo.FoodDataProvider
|
|
|
+import com.develop.common.data_repo.db.FoodContentModel
|
|
|
import com.develop.common.data_repo.db.ModesType
|
|
|
import com.develop.common.data_repo.db.entity.UserFavoriteRecipes
|
|
|
import com.develop.common.data_repo.db.entity.UserHistoryRecipes
|
|
|
+import com.develop.common.data_repo.db.getTime
|
|
|
import com.develop.common.data_repo.net.TokenInvalidateEvent
|
|
|
import com.develop.common.dialog.CancelConfirmDialog
|
|
|
import com.develop.common.dialog.PotCoverUnlockedDialog
|
|
@@ -59,6 +61,7 @@ import com.develop.common.tag.SOURCE_TAG
|
|
|
import com.develop.common.tag.TURN_DOWN_KEY_CODE
|
|
|
import com.develop.common.tag.TURN_UP_KEY_CODE
|
|
|
import com.develop.common.utils.CofarUtils
|
|
|
+import com.develop.common.utils.CommonUtils
|
|
|
import com.develop.common.utils.ConfigUtils
|
|
|
import com.develop.common.utils.TimeUtil
|
|
|
import com.develop.step.ui.cook_step.model.CookStepStatus
|
|
@@ -92,8 +95,11 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
private var isSelectMode: String? = ""
|
|
|
private var mResetPressedTime: Long = 0 //防止客户重复点击复位
|
|
|
private var isNight = false
|
|
|
- @JvmField
|
|
|
- @Autowired(name = "cook_step_detail")
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @JvmField
|
|
|
+ @Autowired(name = "cook_step_detail")
|
|
|
var cookStepDetail: String? = null
|
|
|
|
|
|
|
|
@@ -130,12 +136,10 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
private fun turnDevModeUI(devMode: String?) {
|
|
|
isSelectMode = devMode
|
|
|
- binding.controller.clCookTemp.visibility = View.VISIBLE
|
|
|
- binding.controller.clCookTime.visibility = View.VISIBLE
|
|
|
+ binding.controller.clCookTemp.visibility = View.VISIBLE
|
|
|
+ binding.controller.clCookTime.visibility = View.VISIBLE
|
|
|
if (isSelectMode == DevModes.AIR_FRYER) {
|
|
|
//隐藏点击
|
|
|
binding.controller.clCookDirection.visibility = View.GONE;
|
|
@@ -155,7 +159,7 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
|
|
|
}
|
|
|
if (isSelectMode == DevModes.STAND_MIXER) {
|
|
|
- binding.controller.clCookTemp.visibility = View.GONE
|
|
|
+ binding.controller.clCookTemp.visibility = View.GONE
|
|
|
//隐藏点击
|
|
|
binding.controller.clCookDirection.visibility = View.GONE;
|
|
|
binding.controller.clCookSpeed.visibility = View.VISIBLE;
|
|
@@ -174,8 +178,8 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
configJson = ConfigUtils.loadCookConfig()
|
|
|
isModelNum = getModelNum()
|
|
|
isNight = isNightTheme()
|
|
|
- viewModel.tuyaStepJson = tuyaStep ?:""
|
|
|
- viewModel.tuyaRecipeJson = tuyaRecipe ?:""
|
|
|
+ viewModel.tuyaStepJson = tuyaStep ?: ""
|
|
|
+ viewModel.tuyaRecipeJson = tuyaRecipe ?: ""
|
|
|
|
|
|
keep = intent.extras?.getBoolean("keep", false) ?: false
|
|
|
|
|
@@ -241,8 +245,11 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
viewModel.stepUiData.doingModify = true
|
|
|
var totalTime = second + (minute + hours * 60) * 60
|
|
|
var times = time
|
|
|
- Log.e("TACC rollTimeEvent","currentMotorGer:$currentMotorGer hours:$hours minute:$minute second:$second time:$time setByUser:$setByUser")
|
|
|
- if (currentMotorGer>=7 && totalTime > 600) {
|
|
|
+ Log.e(
|
|
|
+ "TACC rollTimeEvent",
|
|
|
+ "currentMotorGer:$currentMotorGer hours:$hours minute:$minute second:$second time:$time setByUser:$setByUser"
|
|
|
+ )
|
|
|
+ if (currentMotorGer >= 7 && totalTime > 600) {
|
|
|
totalTime = 600
|
|
|
times = "10:00"
|
|
|
}
|
|
@@ -347,7 +354,8 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
}
|
|
|
|
|
|
if (currModes != "WIGHT" && currModes != "WEIGH" && currModes != "WEIGHT"
|
|
|
- && currModes !="AF_WEIGHT" && currModes != "SM_WEIGHT" && currModes != "SM_WIGHT") {
|
|
|
+ && currModes != "AF_WEIGHT" && currModes != "SM_WEIGHT" && currModes != "SM_WIGHT"
|
|
|
+ ) {
|
|
|
binding.viewWeightClose.setVisible()
|
|
|
binding.viewChangeCrush.visibility = View.INVISIBLE
|
|
|
}
|
|
@@ -454,12 +462,12 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
} else if (it.isDescription()) {
|
|
|
CofarSDK.stoptWeight()
|
|
|
changeDescription()
|
|
|
- } else if (it.isWarning()) {
|
|
|
+ } else if (it.isWarning()) {
|
|
|
CofarSDK.stoptWeight()
|
|
|
changeWarning()
|
|
|
} else {
|
|
|
//由于暂停程序,在点击右上角称重后,在点击上一步或者下一步,返回当前步骤,会导致右上角是个X,估在这再加多此代码判断
|
|
|
- if (binding.viewWeightClose.isVisible){
|
|
|
+ if (binding.viewWeightClose.isVisible) {
|
|
|
binding.viewWeightClose.setGone()
|
|
|
binding.viewChangeCrush.setVisible()
|
|
|
}
|
|
@@ -545,7 +553,7 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
binding.ivCookBg.setGone()
|
|
|
}
|
|
|
//处理煮水不能修改时间
|
|
|
- if (it.isWater()){
|
|
|
+ if (it.isWater()) {
|
|
|
it.uiData.isTimeChange = false
|
|
|
}
|
|
|
updateUiSetting(it)
|
|
@@ -573,8 +581,8 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
modeName = this@CookStepActivity.binding.tvTitleStep.text.toString(),
|
|
|
detailJson = cookStepDetail ?: "",
|
|
|
sizelJson = portionSizelJson ?: "",
|
|
|
- tuyaStepJson = viewModel.tuyaStepJson,
|
|
|
- tuyaRecipeJson = viewModel.tuyaRecipeJson
|
|
|
+ tuyaStepJson = viewModel.tuyaStepJson,
|
|
|
+ tuyaRecipeJson = viewModel.tuyaRecipeJson
|
|
|
|
|
|
)
|
|
|
FloatWindowManager.showStepFlowWindow(cookStepEvent)
|
|
@@ -610,8 +618,8 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
modeName = this@CookStepActivity.binding.tvTitleStep.text.toString(),
|
|
|
detailJson = cookStepDetail ?: "",
|
|
|
sizelJson = portionSizelJson ?: "",
|
|
|
- tuyaStepJson = viewModel.tuyaStepJson,
|
|
|
- tuyaRecipeJson = viewModel.tuyaRecipeJson
|
|
|
+ tuyaStepJson = viewModel.tuyaStepJson,
|
|
|
+ tuyaRecipeJson = viewModel.tuyaRecipeJson
|
|
|
|
|
|
)
|
|
|
FloatWindowManager.showStepFlowWindow(cookStepEvent)
|
|
@@ -631,17 +639,28 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
|
|
|
val result = FoodDataProvider.getUserDatabase().userInfoDao()
|
|
|
.queryFavoriteRecipes(CURRENT_USER_ID, it.number ?: "")
|
|
|
- if (result.isNotEmpty()) {
|
|
|
- binding.ivAddToFav.src = R.drawable.ic_like
|
|
|
- } else {
|
|
|
- binding.ivAddToFav.src = R.drawable.ic_cook_fav
|
|
|
+
|
|
|
+ if (baseSn.startsWith("011D")){
|
|
|
+ if (isLike) {
|
|
|
+ binding.ivAddToFav.src = R.drawable.ic_like
|
|
|
+ } else {
|
|
|
+ binding.ivAddToFav.src = R.drawable.ic_cook_fav
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if (result.isNotEmpty()) {
|
|
|
+ binding.ivAddToFav.src = R.drawable.ic_like
|
|
|
+ } else {
|
|
|
+ binding.ivAddToFav.src = R.drawable.ic_cook_fav
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
titleName = it?.name.toString()
|
|
|
binding.tvTitleStep.text = it?.name
|
|
|
}
|
|
|
|
|
|
viewModel.addLikeLiveData.observe(this) {
|
|
|
- if (baseSn.startsWith("011")){
|
|
|
+ if (baseSn.startsWith("011")) {
|
|
|
recipesloadingDialog.removeSelf()
|
|
|
}
|
|
|
|
|
@@ -657,7 +676,7 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
|
|
|
|
|
|
viewModel.deleteLikeLiveData.observe(this) {
|
|
|
- if (baseSn.startsWith("011")){
|
|
|
+ if (baseSn.startsWith("011")) {
|
|
|
recipesloadingDialog.removeSelf()
|
|
|
}
|
|
|
|
|
@@ -787,7 +806,7 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
modeType = workModes?.type ?: "ADAPTED_COOKING"
|
|
|
turnDevModeUI(workDevMode)
|
|
|
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
// if (viewModel.allSteps.get(viewModel.stepIndex).isWeightMode()){
|
|
|
// changeWeightPanel()
|
|
|
// CofarSDK.stoptWeight()
|
|
@@ -801,9 +820,8 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
override fun clickNextStep() {
|
|
|
|
|
|
|
|
|
-
|
|
|
//如果当前步骤运行中,设置了参数,然后切换了界面以后,在返回没有保持在调参数的界面
|
|
|
- if (binding.controller.btnStart.tag == BUTTON_TAG_CONFIRM){
|
|
|
+ if (binding.controller.btnStart.tag == BUTTON_TAG_CONFIRM) {
|
|
|
handleButtonState(BUTTON_TAG_CANCEL)
|
|
|
}
|
|
|
|
|
@@ -831,9 +849,8 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
override fun clickPrevStep() {
|
|
|
|
|
|
|
|
|
-
|
|
|
//如果当前步骤运行中,设置了参数,然后切换了界面以后,在返回没有保持在调参数的界面
|
|
|
- if (binding.controller.btnStart.tag == BUTTON_TAG_CONFIRM){
|
|
|
+ if (binding.controller.btnStart.tag == BUTTON_TAG_CONFIRM) {
|
|
|
handleButtonState(BUTTON_TAG_CANCEL)
|
|
|
}
|
|
|
|
|
@@ -957,7 +974,7 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
} else if (tag == BUTTON_TAG_RESUME) {
|
|
|
CofarSDK.resume()
|
|
|
//处理resume 揉面/间接性搅拌设置0温度 会自动STOP问题 试过1度也会自动暂停,估设置2度
|
|
|
- if ((modeType == "KNEAD" || modeType == "KNEAD_TOUGH"|| modeType == "BROWN" || modeType == "ROAST")&¤tTemp==0){
|
|
|
+ if ((modeType == "KNEAD" || modeType == "KNEAD_TOUGH" || modeType == "BROWN" || modeType == "ROAST") && currentTemp == 0) {
|
|
|
/**
|
|
|
* 之前试过设置1度的时候,mcu没接收,估设置5度
|
|
|
* 设置2度 但是目标温度是0度,但是没有自动暂停
|
|
@@ -967,7 +984,7 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
|
|
|
} else if (tag == BUTTON_TAG_CONFIRM) {
|
|
|
//处理010 033 后台后回来的显示转速问题
|
|
|
- CofarSDK.confirm()
|
|
|
+ CofarSDK.confirm()
|
|
|
confirmType = true
|
|
|
binding.controller.btnStart.setGone()
|
|
|
binding.controller.btnReset.setGone()
|
|
@@ -1068,7 +1085,7 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
checkShowConfirm()
|
|
|
}
|
|
|
|
|
|
- override fun onDevStateChange(devInfo: DevInfo) {
|
|
|
+ override fun onDevStateChange(devInfo: DevInfo) {
|
|
|
if (configing) {
|
|
|
return
|
|
|
}
|
|
@@ -1164,9 +1181,9 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
binding.ivCookBg.setVisible()
|
|
|
notifyAllCookStepComplete()
|
|
|
} else {
|
|
|
- if (isNight){
|
|
|
+ if (isNight) {
|
|
|
binding.ivCookBg.setGone()
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
binding.ivCookBg.setVisible()
|
|
|
|
|
|
}
|
|
@@ -1258,9 +1275,9 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
)
|
|
|
CofarSDK.cfgMotorGear(uiData.currentSpeed.toByte())
|
|
|
//处理揉面/间接性搅拌 0温度 会自动STOP问题 试过1度也会自动暂停,估设置2度
|
|
|
- if ((modeType == "KNEAD" || modeType == "KNEAD_TOUGH"|| modeType == "BROWN" || modeType == "ROAST")&&uiData.targetTemp==0){
|
|
|
+ if ((modeType == "KNEAD" || modeType == "KNEAD_TOUGH" || modeType == "BROWN" || modeType == "ROAST") && uiData.targetTemp == 0) {
|
|
|
CofarSDK.cfgHeatNativeNoParse(2, HeatModes.PU_TONG)
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
CofarSDK.cfgHeat(uiData.targetTemp.toShort(), HeatModes.PU_TONG)
|
|
|
}
|
|
|
CofarSDK.cancel()
|
|
@@ -1408,7 +1425,7 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
}
|
|
|
} else if (tabType == CookSettingType.TIME_SETTING) {
|
|
|
cookStep?.uiData?.let {
|
|
|
- if (!it.isTimeChange&& (it.mode == WorkModes.KETTLE||it.mode == WorkModes.BOIL_WATER)) {
|
|
|
+ if (!it.isTimeChange && (it.mode == WorkModes.KETTLE || it.mode == WorkModes.BOIL_WATER)) {
|
|
|
return
|
|
|
}
|
|
|
dealWithTimeByOperation(it, increase)
|
|
@@ -1482,11 +1499,11 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
// uiData.isTimeChange = true
|
|
|
Log.d("TAG eeeeeee", "${uiData.targetTime} == ${currTime} === $step")
|
|
|
//处理时间 转速高于7的实话最高10分钟
|
|
|
- if (currentMotorGer>=7&&currTime>600){
|
|
|
+ if (currentMotorGer >= 7 && currTime > 600) {
|
|
|
currTime = 600
|
|
|
}
|
|
|
//处理时间,煮水bug,时间会一直超过98小时,故在这做98小时限制,其他模式会有时间限制
|
|
|
- if (currTime>=352800){
|
|
|
+ if (currTime >= 352800) {
|
|
|
currTime = 352800;
|
|
|
}
|
|
|
uiData.targetTime = currTime
|
|
@@ -1494,9 +1511,9 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
Log.d("TAG eeeeeee", "调节时间:${currTime}")
|
|
|
|
|
|
// LogUtils.d("调节时间:${currTime}")
|
|
|
- if (uiData.mode ==WorkModes.KETTLE || uiData.mode ==WorkModes.BOIL_WATER){
|
|
|
+ if (uiData.mode == WorkModes.KETTLE || uiData.mode == WorkModes.BOIL_WATER) {
|
|
|
binding.controller.clSetTime.isTimeCanChange(false)
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
binding.controller.clSetTime.isTimeCanChange(true)
|
|
|
}
|
|
|
// 回调到上面那个地方来设置时间
|
|
@@ -1632,7 +1649,7 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
if (baseSn.startsWith("011")) {
|
|
|
viewModel.deleteLikeRecipes(recipeNumber ?: "")
|
|
|
recipesloadingDialog.showDialog(supportFragmentManager, "loadingDialog")
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
isLike = false
|
|
|
FoodDataProvider.getUserDatabase().runInTransaction {
|
|
|
FoodDataProvider.getUserDatabase().userInfoDao().removeFavoriteRecipe(
|
|
@@ -1644,10 +1661,10 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
- if (baseSn.startsWith("011")){
|
|
|
+ if (baseSn.startsWith("011")) {
|
|
|
viewModel.addLikeRecipes(recipeNumber ?: "")
|
|
|
recipesloadingDialog.showDialog(supportFragmentManager, "loadingDialog")
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
isLike = true
|
|
|
binding.ivAddToFav.src = R.drawable.ic_like
|
|
|
FoodDataProvider.getUserDatabase().runInTransaction {
|
|
@@ -1692,7 +1709,7 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
binding.controller.btnStart.updateText(getString(R.string.pause))
|
|
|
binding.controller.btnStart.tag = BUTTON_TAG_PAUSE
|
|
|
} else {
|
|
|
- if (confirmType){
|
|
|
+ if (confirmType) {
|
|
|
return
|
|
|
}
|
|
|
binding.controller.btnStart.setVisible()
|
|
@@ -1735,16 +1752,17 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
//电机转动动画特殊处理 慢炖 和 揉面
|
|
|
if (uiData.mode == WorkModes.KNEAD
|
|
|
|| uiData.mode == WorkModes.KNEAD_TOUGH
|
|
|
- ||uiData.mode == WorkModes.SLOW_COOKING
|
|
|
+ || uiData.mode == WorkModes.SLOW_COOKING
|
|
|
|| uiData.mode == WorkModes.SLOW_COOK
|
|
|
- ||modeType == WorkModes.ROAST
|
|
|
- || modeType == WorkModes.BROWN){
|
|
|
+ || modeType == WorkModes.ROAST
|
|
|
+ || modeType == WorkModes.BROWN
|
|
|
+ ) {
|
|
|
if (viewModel.isCurrentOnCookingStep() && uiData.runningStatus == DevStatus.RUNNING.toInt() && CofarSDK.devInfo().isSpeedType) {
|
|
|
playRotateAnimator(CofarSDK.devInfo().motorDirection.toInt())
|
|
|
} else {
|
|
|
pauseRotateAnimator()
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
// 播放电机转动动画
|
|
|
if (viewModel.isCurrentOnCookingStep() && uiData.runningStatus == DevStatus.RUNNING.toInt() && uiData.currentSpeed > 0) {
|
|
|
playRotateAnimator(CofarSDK.devInfo().motorDirection.toInt()) //2023年06月28日20:58:13 旋转方向和实时固定
|
|
@@ -1754,8 +1772,6 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
// 时间设置
|
|
|
val time = if (uiData.targetTimeBuffer != -1) {
|
|
|
uiData.targetTimeBuffer
|
|
@@ -1808,7 +1824,6 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
binding.controller.tvSetSpeed.updateText(speed.toString()) // 下面的TAB-当前运行速度
|
|
|
|
|
|
|
|
|
-
|
|
|
// 喷水设置
|
|
|
if (!viewModel.stepUiData.doingModify || focusUpdate) {
|
|
|
binding.controller.waterRingView.updateProgress(
|
|
@@ -1876,7 +1891,10 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
|
|
|
////devInfo.potStatus 0是有锅 1是没锅
|
|
|
//处理换锅问题 viewModel.allSteps.get(viewModel.stepIndex)?.isWeightMode() 判断是否是称重
|
|
|
- if (isModelNum == "5037" && event.devInfo.potStatus.toInt() == 0 && viewModel.allSteps.get(viewModel.stepIndex)?.isWeightMode() == false) {
|
|
|
+ if (isModelNum == "5037" && event.devInfo.potStatus.toInt() == 0 && viewModel.allSteps.get(
|
|
|
+ viewModel.stepIndex
|
|
|
+ )?.isWeightMode() == false
|
|
|
+ ) {
|
|
|
/**
|
|
|
* 由于客户无锅状态下是默认汤锅列表,但是在一进来是空炸锅,拿出来(无锅的时候已经换了汤锅模式),
|
|
|
* 但重新放空炸锅,onDevModeChange 是不会回调的,固需要用potCoverType 锅盖协议来判断是否需要重新换模式
|
|
@@ -1895,7 +1913,10 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
|
|
|
}
|
|
|
|
|
|
- if (isModelNum == "5067" && event.devInfo.potStatus.toInt() == 0 && viewModel.allSteps.get(viewModel.stepIndex)?.isWeightMode() == false) {
|
|
|
+ if (isModelNum == "5067" && event.devInfo.potStatus.toInt() == 0 && viewModel.allSteps.get(
|
|
|
+ viewModel.stepIndex
|
|
|
+ )?.isWeightMode() == false
|
|
|
+ ) {
|
|
|
/**
|
|
|
* 由于客户无锅状态下是默认汤锅列表,但是在一进来是空炸锅,拿出来(无锅的时候已经换了汤锅模式),
|
|
|
* 但重新放空炸锅,onDevModeChange 是不会回调的,固需要用potCoverType 锅盖协议来判断是否需要重新换模式
|
|
@@ -1934,19 +1955,28 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
private fun recordRecipes() {
|
|
|
if (!isHistory) {
|
|
|
isHistory = true
|
|
|
- FoodDataProvider.getUserDatabase().runInTransaction {
|
|
|
- recipeNumber?.let {
|
|
|
- FoodDataProvider.getUserDatabase().userInfoDao().removeHistoryRecipe(
|
|
|
- CURRENT_USER_ID, it
|
|
|
+ if (baseSn.startsWith("011")) {
|
|
|
+ recordRecipes = true
|
|
|
+
|
|
|
+ } else {
|
|
|
+ FoodDataProvider.getUserDatabase().runInTransaction {
|
|
|
+ recipeNumber?.let {
|
|
|
+ FoodDataProvider.getUserDatabase().userInfoDao().removeHistoryRecipe(
|
|
|
+ CURRENT_USER_ID, it
|
|
|
+ )
|
|
|
+ }
|
|
|
+ FoodDataProvider.getUserDatabase().userInfoDao().insertHistoryRecipe(
|
|
|
+ UserHistoryRecipes(CURRENT_USER_ID, recipeNumber ?: "")
|
|
|
)
|
|
|
}
|
|
|
- FoodDataProvider.getUserDatabase().userInfoDao().insertHistoryRecipe(
|
|
|
- UserHistoryRecipes(CURRENT_USER_ID, recipeNumber ?: "")
|
|
|
- )
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
//当换锅的时候,需要做的逻辑
|
|
|
@Subscribe
|
|
|
fun onDevModeChange(event: DevCommonEvent) {
|
|
@@ -2018,8 +2048,8 @@ class CookStepActivity : CookStepBaseActivity() {
|
|
|
modeName = this@CookStepActivity.binding.tvTitleStep.text.toString(),
|
|
|
detailJson = cookStepDetail ?: "",
|
|
|
sizelJson = portionSizelJson ?: "",
|
|
|
- tuyaStepJson = viewModel.tuyaStepJson,
|
|
|
- tuyaRecipeJson = viewModel.tuyaRecipeJson
|
|
|
+ tuyaStepJson = viewModel.tuyaStepJson,
|
|
|
+ tuyaRecipeJson = viewModel.tuyaRecipeJson
|
|
|
)
|
|
|
FloatWindowManager.showStepFlowWindow(cookStepEvent)
|
|
|
getRecipe(number)
|