Merge branch 'dev' into cobthread

This commit is contained in:
Milos Kozak 2018-01-23 22:04:42 +01:00
commit d4ddfbb942
2 changed files with 6 additions and 8 deletions

View file

@ -507,7 +507,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
return 0;
}
public int deleteDbRequestbyMongoId(String action, String id) {
public void deleteDbRequestbyMongoId(String action, String id) {
try {
QueryBuilder<DbRequest, String> queryBuilder = getDaoDbRequest().queryBuilder();
Where where = queryBuilder.where();
@ -515,16 +515,13 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
queryBuilder.limit(10L);
PreparedQuery<DbRequest> preparedQuery = queryBuilder.prepare();
List<DbRequest> dbList = getDaoDbRequest().query(preparedQuery);
if (dbList.size() != 1) {
log.error("deleteDbRequestbyMongoId query size: " + dbList.size());
} else {
//log.debug("Treatment findTreatmentById found: " + trList.get(0).log());
return delete(dbList.get(0));
log.error("deleteDbRequestbyMongoId query size: " + dbList.size());
for (DbRequest r : dbList) {
delete(r);
}
} catch (SQLException e) {
log.error("Unhandled exception", e);
}
return 0;
}
public void deleteAllDbRequests() {

View file

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