Fix setting custom app mode after the start of navigation

This commit is contained in:
Chumva 2019-10-28 13:00:51 +02:00
parent 15326798b1
commit 1c22c42c2f

View file

@ -457,7 +457,12 @@ public class AppInitializer implements IProgress {
public void onCreateApplication() {
// always update application mode to default
OsmandSettings osmandSettings = app.getSettings();
if (!osmandSettings.FOLLOW_THE_ROUTE.get()) {
if (osmandSettings.FOLLOW_THE_ROUTE.get()) {
ApplicationMode savedMode = osmandSettings.readApplicationMode();
if (!osmandSettings.APPLICATION_MODE.get().getStringKey().equals(savedMode.getStringKey())) {
osmandSettings.APPLICATION_MODE.set(savedMode);
}
} else {
osmandSettings.APPLICATION_MODE.set(osmandSettings.DEFAULT_APPLICATION_MODE.get());
}
startTime = System.currentTimeMillis();