fix(ui): 修复菜品清空图标显示和日志记录问题
- 将菜品清空图标从tools:src改为android:src以确保正常显示 - 在点击清空图标时添加菜品数据的JSON日志输出便于调试 - 移除isOriginalData状态重置避免影响菜品原始数据标记
This commit is contained in:
@@ -312,10 +312,10 @@ class PrepareCookActivity : BaseActivity() {
|
||||
onFoodItemClick(positon)
|
||||
}
|
||||
addOnItemChildClickListener(R.id.ivClearIcon) { _, _, positon ->
|
||||
Log.d(TAG, "onFoodItemClick: ${list[positon].toJsonString()}")
|
||||
if (list[positon].isOriginalData) {
|
||||
list[positon].run {
|
||||
isNewDishType = false
|
||||
isOriginalData = false
|
||||
useWeight = 0.0
|
||||
isSetFinished = false
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 12 KiB |
@@ -59,7 +59,7 @@
|
||||
android:id="@+id/ivClearIcon"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="60dp"
|
||||
tools:src="@drawable/ic_dish_clear"
|
||||
android:src="@drawable/ic_dish_clear"
|
||||
android:layout_marginEnd="10dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
Reference in New Issue
Block a user