Commit d4deaba5 by jason

新增食材 闪退 修复

parent 4ad0cf15
......@@ -172,12 +172,12 @@ public class NewFoodIngredientsFragment extends BaseSupplyChainFragment<NewFoodI
public void initAdapter() {
infoMultiAdapter = new InfoMultiAdapter(mContext, mPresenter.getFragmentInfo(mContext, (v, hasFocus) -> {
LogUtil.e("zjs"," initAdapter currentThread "+v.isPressed()+" hasFocus__"+v.hasFocus()+" hasFocus=="+hasFocus);
if (hasFocus && purchaseFoodBean.getUnitPrice()>0) {
InfoMultiBean infoMultiBean = infoMultiAdapter.getItem(12);
infoMultiBean.setShowValue("");
purchaseFoodBean.setUnitPrice(0d);
rvNewFoodIngredients.postDelayed(() -> infoMultiAdapter.notifyItemChanged(12),10);
}
if (hasFocus && purchaseFoodBean != null && purchaseFoodBean.getUnitPrice()>0) {
InfoMultiBean infoMultiBean = infoMultiAdapter.getItem(12);
infoMultiBean.setShowValue("");
purchaseFoodBean.setUnitPrice(0d);
rvNewFoodIngredients.postDelayed(() -> infoMultiAdapter.notifyItemChanged(12),10);
}
}));
rvNewFoodIngredients.addItemDecoration(new DividerItemDecoration(mContext, VERTICAL_LIST));
infoMultiAdapter.setOnItemClickListener((adapter, view, position) -> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment