mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-22 04:29:22 +01:00
Fix therehold not save bug
This commit is contained in:
parent
4b4d15c9fc
commit
8a205163b4
2 changed files with 3 additions and 6 deletions
|
@ -316,6 +316,8 @@ class DBHelper extends SQLiteOpenHelper {
|
|||
values.put(KEY_PRES, drug.getPresentation());
|
||||
values.put(KEY_STOCK, drug.getStock());
|
||||
values.put(KEY_TAKE, drug.getTake());
|
||||
values.put(KEY_THRESHOLD_WARN, drug.getWarnThreshold());
|
||||
values.put(KEY_THRESHOLD_ALERT, drug.getAlertThreshold());
|
||||
values.put(KEY_LAST_UPDATE, drug.getDateLastUpdate());
|
||||
|
||||
String[] selectionArgs = { String.valueOf(drug.getId()) };
|
||||
|
|
|
@ -238,12 +238,7 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
if (requestCode == CUSTOMIZED_REQUEST_CODE) {
|
||||
Toast.makeText(this, "REQUEST_CODE = " + requestCode + "RESULT_CODE = " + resultCode, Toast.LENGTH_LONG).show();
|
||||
Log.d(TAG, "REQUEST_CODE = " + requestCode + " RESULT_CODE = " + resultCode);
|
||||
if (resultCode == 1) {
|
||||
constructDrugsList();
|
||||
} else {
|
||||
Toast.makeText(this, "What are you doing here?", Toast.LENGTH_SHORT).show();
|
||||
Log.d(TAG, "What are you doing here?");
|
||||
}
|
||||
constructDrugsList();
|
||||
} else {
|
||||
IntentResult result = IntentIntegrator.parseActivityResult(resultCode, data);
|
||||
|
||||
|
|
Loading…
Reference in a new issue