Merge branch 'dev' into cobthread

This commit is contained in:
Milos Kozak 2018-01-24 00:00:23 +01:00
commit 8a45422135
2 changed files with 6 additions and 7 deletions

View file

@ -70,7 +70,7 @@ public class FoodHelper {
public boolean createOrUpdate(Food food) { public boolean createOrUpdate(Food food) {
try { try {
// find by NS _id // find by NS _id
if (food._id != null) { if (food._id != null && !food._id.equals("")) {
Food old; Food old;
QueryBuilder<Food, Long> queryBuilder = getDaoFood().queryBuilder(); QueryBuilder<Food, Long> queryBuilder = getDaoFood().queryBuilder();
@ -90,12 +90,13 @@ public class FoodHelper {
} else { } else {
return false; return false;
} }
} } else {
}
getDaoFood().createOrUpdate(food); getDaoFood().createOrUpdate(food);
log.debug("FOOD: New record: " + food.toString()); log.debug("FOOD: New record: " + food.toString());
scheduleFoodChange(); scheduleFoodChange();
return true; return true;
}
}
} catch (SQLException e) { } catch (SQLException e) {
log.error("Unhandled exception", e); log.error("Unhandled exception", e);
} }

View file

@ -61,7 +61,6 @@ public class FoodFragment extends SubscriberFragment {
Bundle savedInstanceState) { Bundle savedInstanceState) {
try { try {
View view = inflater.inflate(R.layout.food_fragment, container, false); View view = inflater.inflate(R.layout.food_fragment, container, false);
log.debug(">>>>>>> start onCreateView");
filter = (EditText) view.findViewById(R.id.food_filter); filter = (EditText) view.findViewById(R.id.food_filter);
clearFilter = (ImageView) view.findViewById(R.id.food_clearfilter); clearFilter = (ImageView) view.findViewById(R.id.food_clearfilter);
category = new SpinnerHelper(view.findViewById(R.id.food_category)); category = new SpinnerHelper(view.findViewById(R.id.food_category));
@ -129,7 +128,6 @@ log.debug(">>>>>>> start onCreateView");
fillCategories(); fillCategories();
fillSubcategories(); fillSubcategories();
filterData(); filterData();
log.debug(">>>>>>> end onCreateView");
return view; return view;
} catch (Exception e) { } catch (Exception e) {
Crashlytics.logException(e); Crashlytics.logException(e);