Переглянути джерело

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

江天明 11 місяців тому
батько
коміт
b0b25f8ddb

+ 0 - 4
BusinessMain/src/main/java/com/develop/main/init/ui/FoodListActivity.kt

@@ -180,10 +180,6 @@ class FoodListActivity : BaseActivity<ActivityFoodListBinding>() {
             val recipesDao = FoodDataProvider.getDatabase().recipeDao()
             val recipesIdList = mutableListOf<String>()
             val favoriteRecipesIds = mutableListOf<String>()
-            userDao.queryFavoriteRecipes(CURRENT_USER_ID).forEach {
-//                recipesIdList.add(it.favoriteRecipesId)
-                favoriteRecipesIds.add(it.favoriteRecipesId)
-            }
             userDao.queryUserOnLineRecipesIds().forEach {
                 recipesIdList.add(it.onLineRecipesId)
             }

+ 3 - 1
BusinessStep/src/main/java/com/develop/step/CookStepActivity2.kt

@@ -897,7 +897,9 @@ class CookStepActivity2 : CookStepToolActivity() {
 
     override fun onKeyLongPress(keyCode: Int, event: KeyEvent?): Boolean {
 
-        if (CofarSDK.devInfo().status == DevStatus.RUNNING.toInt() || CofarSDK.devInfo().status == DevStatus.PAUSE.toInt()) {
+        if (CofarSDK.devInfo().isWeightStatus) {
+            CofarSDK.clearWeight()
+        } else if (CofarSDK.devInfo().status == DevStatus.RUNNING.toInt() || CofarSDK.devInfo().status == DevStatus.PAUSE.toInt()) {
             viewModel.stepUiData.doingModify = false
             clickFirstButton(BUTTON_TAG_STOP)
             Log.d("QQQQ", "click stop")

+ 9 - 13
BusinessStep/src/main/java/com/develop/step/modes/ModesDetailActivity.kt

@@ -721,7 +721,9 @@ class ModesDetailActivity : BaseActivity<ActivityModeDetailBinding>() {
             this.window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
             //其他模式
             changeCommonStep()
-
+            this@ModesDetailActivity.isMotorDirectionGearChange =
+                baseMode.isMotorDirectionChange
+            viewModel.changeStep(CookSettingType.TEMP_SETTING)
             if (CofarSDK.devInfo().status != DevStatus.PAUSE.toInt() && CofarSDK.devInfo().status != DevStatus.RUNNING.toInt()) {
 
                 var targetTemp = baseMode.defaultTemp.toShort()
@@ -1166,19 +1168,13 @@ class ModesDetailActivity : BaseActivity<ActivityModeDetailBinding>() {
 
 
     override fun onKeyLongPress(keyCode: Int, event: KeyEvent?): Boolean {
-
-        if (modeType == ModesType.WIGHT.name) {
-            backClick()
-        } else {
-            if (mRunningState == DevStatus.RUNNING.toInt() || currDevInfo.status == DevStatus.PAUSE.toInt()) {
-                stopClick()
-            } else if (mRunningState == DevStatus.STOP.toInt()) {
-                startClick()
-            }
+        if (CofarSDK.devInfo().isWeightStatus) {
+            weightClearClick()
+        } else if (mRunningState == DevStatus.RUNNING.toInt() || currDevInfo.status == DevStatus.PAUSE.toInt()) {
+            stopClick()
+        } else if (mRunningState == DevStatus.STOP.toInt()) {
+            startClick()
         }
-
-
-
         return super.onKeyLongPress(keyCode, event)
     }
 

+ 1 - 1
app/build.gradle

@@ -23,7 +23,7 @@ static  int formatTime() {
 
 ext{
      versionCode=Integer.parseInt(new SimpleDateFormat("yyMMddHH").format(new Date()) + 1)
-     brandCode="000A"
+     brandCode="034A"
      brandVersionCode=versionCode
      model="3015"
 }

+ 1 - 1
libBase/src/main/java/com/develop/food/base/ui/BaseActivity.kt

@@ -329,7 +329,7 @@ abstract class BaseActivity<T : ViewBinding> : AppCompatActivity() {
 //            if(FloatWindowManager.confirmCancelDialog.isAdded){
 //                return
 //            }
-        if (lastMsg == event.msg && !event.isFocus) {
+        if (lastMsg == event.msg) {
             return
         }
 //        if (lastMsg == "dian_zi_cheng_tong_xin_yi_chan" && CofarSDK.devInfo().mode.mode != "WEIGHT") {