-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for General Reports in AMMEX #2138 #2222
Conversation
Pull from Master as of 2025-02-07 06:10 AM IST
Added HTML View of General Reports
@wolfsolver , please review this pull. As of now, I have implemented the report view in HTML. Also by mistake, I have checked in below files and it is same as what I have it in the PULL-2205. Plz ignore this file in this checkin and the correct one is in PULL/2205 app/src/main/java/com/money/manager/ex/notifications/SmsReceiverTransactions.java |
Made few corrections as per Codacy Static Code Analysis
Pull from Master
this is good. for the code itself, can you take a look at the static code analysis results? |
added fix for issue found by Codacy Static Code Analysis
@wolfsolver , I fixed all static code analysis results except SMS related. For now, you can ignore this error. I have changed my method return from boolean to string and testing now. This will get corrected in my next pull request which will happen after covering all my SMS related testing (~75 cases to test). |
Merge from Master 8th Feb 10:31 IST
hi @velmuruganc, can you further look at the conflicts after #2205 merged. additionally, we may consider to impl a bi-sync between the user database.report_v1 and https://github.com/moneymanagerex/general-reports as the SUID is in place shortly. |
@guanlisheng , I resolved the conflict. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. @wolfsolver, thought?
@velmuruganc seems that you reopen db from drawer instead reuse db connection
@guanlisheng what is the best practice for this? register new URI? |
ArrayList<DrawerMenuItem> childReportGroup = new ArrayList<>(); | ||
|
||
// Db setup | ||
MmxOpenHelper MmxHelper = new MmxOpenHelper(this, new AppSettings(this).getDatabaseSettings().getDatabasePath()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not the best way to get dB data.
Create a content provider and register with Uri, so you can use mmx infrastructure to get data
|
||
// Db setup | ||
MmxOpenHelper MmxHelper = new MmxOpenHelper(this, new AppSettings(this).getDatabaseSettings().getDatabasePath()); | ||
SupportSQLiteDatabase db = MmxHelper.getReadableDatabase(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
MmxOpenHelper MmxHelper = new MmxOpenHelper(this, new AppSettings(this).getDatabaseSettings().getDatabasePath()); | ||
SupportSQLiteDatabase db = MmxHelper.getReadableDatabase(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above . You reopen dB too many times
MmxOpenHelper MmxHelper = new MmxOpenHelper(getActivity(), new AppSettings(getActivity()).getDatabaseSettings().getDatabasePath()); | ||
SupportSQLiteDatabase mDatabase = MmxHelper.getReadableDatabase(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above... Don't reopen db
|
||
if(sqlCursor.moveToFirst()) | ||
{ | ||
sqlQuery = sqlCursor.getString(sqlCursor.getColumnIndex("SQLCONTENT")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that general report have also Lua content for elaborate data.
Did you plan do add also this feature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I am going to explore next
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment inline code @velmuruganc
@wolfsolver , thankyou so much for the feedback. I will look into these comments and get back to you. Lot to learn from you both. |
a short way, without changing a lot is to include this as global variable. in this way to get the already instiated variable. not the best way, but quick for now. and remove new isntance declaration
|
one more tiny thing, would we keep original |
You mean report name? |
General Reports to AMMEX #2138