Merge remote-tracking branch 'origin/master'

This commit is contained in:
Alex Sytnyk 2018-04-16 02:06:27 +03:00
commit 49b561017f
2 changed files with 5 additions and 3 deletions

View file

@ -446,10 +446,12 @@ public class AppInitializer implements IProgress {
app.mapMarkersDbHelper = startupInit(new MapMarkersDbHelper(app), MapMarkersDbHelper.class);
app.mapMarkersHelper = startupInit(new MapMarkersHelper(app), MapMarkersHelper.class);
app.searchUICore = startupInit(new QuickSearchHelper(app), QuickSearchHelper.class);
app.travelDbHelper = startupInit(new TravelDbHelper(app), TravelDbHelper.class);
app.travelDbHelper = new TravelDbHelper(app);
if (app.getSettings().SELECTED_TRAVEL_BOOK.get() != null) {
app.travelDbHelper.initTravelBooks();
}
app.travelDbHelper = startupInit(app.travelDbHelper, TravelDbHelper.class);
initOpeningHoursParser();
}

View file

@ -405,17 +405,17 @@ public class MapMarkersGroupsAdapter extends RecyclerView.Adapter<RecyclerView.V
group.setVisibleUntilRestart(disabled);
String gpxPath = group.getGpxPath();
SelectedGpxFile selectedGpxFile = app.getSelectedGpxHelper().getSelectedFileByPath(gpxPath);
gpxFile[0] = selectedGpxFile.getGpxFile();
if (disabled) {
if (selectedGpxFile != null) {
gpxFile[0] = selectedGpxFile.getGpxFile();
switchGpxVisibility(gpxFile[0], false);
}
} else {
if (selectedGpxFile == null) {
// TODO IO load in another thread ?
gpxFile[0] = GPXUtilities.loadGPXFile(app, new File(gpxPath));
switchGpxVisibility(gpxFile[0], true);
}
switchGpxVisibility(gpxFile[0], true);
}
}
mapMarkersHelper.runSynchronization(group);