-
Notifications
You must be signed in to change notification settings - Fork 733
Conversation
- LoanDetailsScreen displays list of all records involving records that increase and decrease total loan amount - LoanDetailsScreenState contains calculated `loanTotalAmount` - LoanRecordModal provides a selection if loan record decrease or increase loan amount. Provided loan record increase total amount, `Mark as interest` checkbox disappears.
- DisplayLoan includes loanTotalAmount - LoanViewModel calculates total amount paid as well as loan total amount. - LoanScreen displays correct information about each loan.
Hey @michalguspiel can you please fix the CI failures and I'll review afterwards? I'm most concerned about the test failures both unit and integration |
- Tests were failing due to the missing field in backup test. Now by default `loanRecordType` in `LoanRecordEntity` has DECRESE value. This fixes the issue with the backup, and is the simplest fix. This makes sense because before this pull request all loan records were implicitly of type DECREASE.
…vy-wallet into fix-issue-2740
Suppressed detekt errors that were forcing this pull request to make changes unrelated to scope of this issue or keeping this pull request inconsistent with the rest of the codebase. - Suppressed LongMethod for LoanInfoCard - Suppressed DataClassDefaultValues for LoanRecordEntity, since there is a few default values already, and `LoanRecordEntity.loanRecordType` default value is the easiest fix for the backup problem. - Suppressed MagicNumber and ClassNaming for Migration class to keep it consistent with the rest of migration classes.
@ILIYANGERMANOV Ready for review. |
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.
Overall LGTM! Have some comments regarding the DB migration part:
- Revert
126.json
- Commit
127.json
- Add DB migration test
Nice work 💯
shared/data/src/main/java/com/ivy/data/db/migration/Migration126to127_LoanRecordType.kt
Show resolved
Hide resolved
Btw @michalguspiel very well written PR description 👏 |
screen/loans/src/main/java/com/ivy/loans/loandetails/LoanDetailsViewModel.kt
Outdated
Show resolved
Hide resolved
Hi @ILIYANGERMANOV would you mind reviewing again? I'm not sure if |
# Conflicts: # shared/resources/src/main/res/values/strings.xml
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! Thanks for making the changes 💯 Fix merge conflicts and we can merge it after ✅ from the CI
Hello, I have been waiting for this feature. Will this be available on the Google Play Store now or we have to wait for an update? |
@RDjarbeng We have to wait for an update. If you want to use it now you need to download the GitHub APK. We can't update right not because |
Okay, I'll just wait for the update. I am not sure what you mean by the Github APK since I can't find an apk file in the repository. I am assuming you meant to build it using android studio. Would be nice to have a time to expect it though. Thanks for replying.👌 |
@RDjarbeng if you're in our Telegram group, GitHub Actions automatically builds and uploads one in the Telegram channel. You can find it in the artifacts of the latest "APK" workflow run |
Pull Request (PR) Checklist
Please check if your pull request fulfills the following requirements:
main
branch.What's changed?
Loans can now be increased. Loan always displays starting amount as the last item in the list. When adding loan record, user can decide if that record is decreasing the loan amount, like every record before this PR or increase it. Amount of loan displays now the total amount of loan, meaning initial amount + each record that increased this amount.
Technicalities:
loanTotalAmount
Mark as interest
checkbox disappears.Screen recording with new feature:
https://youtu.be/VyvornkPsDo
Risk Factors
LoanRecord.loanRecordType
so that backup doesn't fail. Awesome that test has caught this, otherwise I wouldn't have think of this.Does this PR closes any GitHub Issues?
Troubleshooting CI failures ❌
GitHub Actions failing? Read our CI Troubleshooting guide.