WSDOT / wsdot-mobile-app

Source code for the WSDOT HTML5 mobile Web application
GNU General Public License v3.0
13 stars 4 forks source link

Back Button From Favorites Item Should Take Users To Favorites List #38

Closed loganSims closed 8 years ago

loganSims commented 8 years ago

Currently, it takes them back to the main home screen.

loganSims commented 8 years ago

Adding two tokens into HomePlace.java for the home screen and favorites list and using ActionEvent.fire(eventBus, ActionNames.BACK) fixes this issue.

This leads to problems with GoToLocationActivity.java. When a location is selected PlaceController.goTo() is called to get back to the traffic map. This makes the history Map > Goto > Map. Right now this isn't a problem since onBack() in TrafficMapActivity.java calls goTo as well and doesn't use history. With the above fix onBack() in TrafficMapActivity.java would take us back to GoToLocaitonActivity.java.

A workaround would be to call ActionEvent.fire(eventBus, ActionNames.BACK) twice when the user selects a goto location. This would keep history intact.

To actually resolve the issue we may have to look into a more robust use of the AppHistoryObserver class.