优化识别后未离开多次切换模式导致的不再识别问题
This commit is contained in:
@@ -692,7 +692,11 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||
val weight = lastWeight
|
||||
lastWeight = 0.0
|
||||
presentation?.hideRecImage()
|
||||
recognizeByWeight(weight, true)
|
||||
presentation?.step1FoodRecognizing()
|
||||
|
||||
binding.root.postDelayed({
|
||||
recognizeByWeight(weight, true)
|
||||
},500)
|
||||
}
|
||||
isRefreshPage = !isRefreshPage
|
||||
}
|
||||
@@ -748,6 +752,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||
foodWeight: Int,
|
||||
eatWeight: Int,
|
||||
eatNum: Int,
|
||||
userId: String?,
|
||||
block: () -> Unit
|
||||
) {
|
||||
Timber.tag(TAG).d("foodWeight=$foodWeight,eatWeight=$eatWeight")
|
||||
@@ -769,7 +774,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||
eatWeight = eatWeight,
|
||||
//根据specId对应规格重量计算
|
||||
eatNum = eatNum,
|
||||
userId = null,
|
||||
userId = userId,
|
||||
notPay = chargeMode != 0,
|
||||
//即放即取-1,称重-2
|
||||
mode = if (pickupMode == 1) 1 else 2
|
||||
@@ -823,6 +828,13 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||
isStartRecognize = false
|
||||
presentation?.hideNutritionView(event.chargeMode)
|
||||
// presentation?.cancel()
|
||||
|
||||
if (event.chargeMode == 1) {
|
||||
presentation?.let {
|
||||
it.onStop()
|
||||
it.setupArcCamera()
|
||||
}
|
||||
}
|
||||
}
|
||||
private var isRefreshPage = false
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
@@ -868,7 +880,8 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||
foodInfo = checkedItem!!,
|
||||
foodWeight = foodWeight.roundToInt(),
|
||||
eatWeight = eatWeight.roundToInt(),
|
||||
eatNum = eatNum
|
||||
eatNum = eatNum,
|
||||
userId = null,
|
||||
) {
|
||||
// TODO: 暂不关闭首页副屏
|
||||
//presentation?.dismiss()
|
||||
|
||||
Reference in New Issue
Block a user