forked from organicmaps/organicmaps
[android] Close place page on back button press in navigation
Signed-off-by: Arnaud Vergnet <arnaud.vergnet@mailo.com>
This commit is contained in:
parent
0790ec4ad5
commit
d927243cbb
1 changed files with 9 additions and 5 deletions
|
@ -1054,15 +1054,19 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
return;
|
||||
}
|
||||
|
||||
if (RoutingController.get().isNavigating())
|
||||
if (closePlacePage() || closeSidePanel() || closePositionChooser())
|
||||
{
|
||||
RoutingController.get().resetToPlanningState();
|
||||
return;
|
||||
}
|
||||
|
||||
boolean isRoutingCancelled = RoutingController.get().cancel();
|
||||
if (!closePlacePage() && !closeSidePanel() && !isRoutingCancelled
|
||||
&& !closePositionChooser())
|
||||
RoutingController routingController = RoutingController.get();
|
||||
if (routingController.isNavigating())
|
||||
{
|
||||
routingController.resetToPlanningState();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!routingController.cancel())
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue