Conversation
Codecov Report
@@ Coverage Diff @@
## master #619 +/- ##
==========================================
+ Coverage 14.3% 14.32% +0.02%
==========================================
Files 196 202 +6
Lines 9104 9200 +96
Branches 785 790 +5
==========================================
+ Hits 1302 1318 +16
- Misses 7723 7801 +78
- Partials 79 81 +2
Continue to review full report at Codecov.
|
f4ww4z
left a comment
There was a problem hiding this comment.
Thanks @deepak140596 , see my comments below.
...src/main/java/org/openmrs/mobile/activities/providerdashboard/ProviderDashboardActivity.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/openmrs/mobile/activities/providerdashboard/ProviderDashboardActivity.java
Outdated
Show resolved
Hide resolved
| super.onCreate(savedInstanceState); | ||
| setContentView(R.layout.activity_provider_dashboard); | ||
|
|
||
| provider = (Provider) (getIntent().getSerializableExtra(ApplicationConstants.BundleKeys.PROVIDER_ID_BUNDLE)); |
There was a problem hiding this comment.
This should be a Presenter code, not an activity one. You should use the presenter to get the provider from an intent.
|
|
||
| @Override | ||
| public void onFailure() { | ||
|
|
There was a problem hiding this comment.
Show an error toast here so the user knows, don't leave it empty.
There was a problem hiding this comment.
The toast messages for different failures are present in the ProviderRepository class. These custom callbacks are for logic for updating views in case of failures. If I add a toast here, two toasts are show to the user back to back.
I provided toasts in the ProviderRepository because we can differentiate between different failed cases easily (network not connected or failed api callback).
There was a problem hiding this comment.
@deepak140596 Ok. In that case, can you show an indefinite Snackbar that says the connection failed, with a button to retry loading?
There was a problem hiding this comment.
@f4ww4z , yes. I have added that. Please review it.
Description of what I changed
Issue I worked on
JIRA Issue: https://issues.openmrs.org/browse/AC-626
Checklist: I completed these to help reviewers :)
(the number above, next to the 'Commits' tab is 1).
existing code that was well tested you do not have to add tests)