chithrabhanupakaravoor / daily-money

Automatically exported from code.google.com/p/daily-money
0 stars 0 forks source link

Adding new record from the list view should use the day from the list view, not today. #88

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go to the list view
2. Click the setting button to add a new record

What is the expected output?
* The record day should be the day where brings from the list view

What do you see instead?
* The record day is today

What version of the product are you using?
* 0.9.7

On what operating system?
Android 4.0

Original issue reported on code.google.com by jumperc...@gmail.com on 25 Feb 2012 at 1:31

GoogleCodeExporter commented 9 years ago
DetailListHelper.java
-    public void doNewDetail() {
-        Detail d = new Detail("","",new Date(),0D,"");
-        Intent intent = null;
-        intent = new Intent(activity,DetailEditorActivity.class);
-        intent.putExtra(DetailEditorActivity.INTENT_MODE_CREATE,true);
-        intent.putExtra(DetailEditorActivity.INTENT_DETAIL,d);
-        
activity.startActivityForResult(intent,Constants.REQUEST_DETAIL_EDITOR_CODE);
-    }
+    public void doNewDetail() {
+        doNewDetail(null);
+    }
+
+    public void doNewDetail(Date date) {
+        Detail d = new Detail("", "", date == null ? new Date() : date, 0D, 
"");
+        Intent intent = null;
+        intent = new Intent(activity, DetailEditorActivity.class);
+        intent.putExtra(DetailEditorActivity.INTENT_MODE_CREATE, true);
+        intent.putExtra(DetailEditorActivity.INTENT_DETAIL, d);
+        activity.startActivityForResult(intent, 
Constants.REQUEST_DETAIL_EDITOR_CODE);
+    }

DetailListActivity.java
- detailListHelper.doNewDetail();
+ detailListHelper.doNewDetail(currentDate);

Original comment by Lancelot...@gmail.com on 12 Apr 2012 at 4:07

GoogleCodeExporter commented 9 years ago
I see it fixed in the current build, 0.9.8-121107-freshly.

Original comment by maximl...@gmail.com on 28 Jan 2015 at 8:42