WSDOT / wsdot-android-app

Source code for the WSDOT Android application
GNU General Public License v3.0
19 stars 12 forks source link

Pass Report Refresh Added #139

Closed loganSims closed 7 years ago

loganSims commented 7 years ago

Issue #137

Changes

Added a refresh button to the pass reports.

This required a bit of a refactor to pull off.

Previously, the report view was populated with data passed from the main report view. This meant if the user wanted to refresh the current report, they would need to back up to the main pass list and refresh the list.

In order to add a refresh button to the report view the MountainPassItemActivity now only receives a mountain pass ID. This ID is then passed to the fragment views, which uses the ID to check the Database for the report.

The refresh button calls the sync service to update all pass reports, once completed, it alerts the MountainPassItemActivity, which in turn tells the fragments to check for new data in the database. For the cameras lists a timestamp is added to the end of the URL to prevent the image manager from using a cached image.

Please note that refreshing a report will pull in new reports for every pass. I don't think this will be an issue since the current way to refresh one report is to do the same. The only obvious fix for this would be to add new API endpoints for each pass, which could end up being a lot to maintain.

Updated the pass report layout.

Moved Restrictions information to the top. Now matches the layout of the iOS app.