Merge branch 'master' of ssh://github.com/osmandapp/Osmand into WikivoyageExploreCards
This commit is contained in:
commit
d089956285
2 changed files with 5 additions and 5 deletions
|
@ -717,8 +717,6 @@ public class OsmandSettings {
|
|||
public final CommonPreference<Boolean> SHOW_LINES_TO_FIRST_MARKERS = new BooleanPreference("show_lines_to_first_markers", false).makeProfile();
|
||||
public final CommonPreference<Boolean> SHOW_ARROWS_TO_FIRST_MARKERS = new BooleanPreference("show_arrows_to_first_markers", false).makeProfile();
|
||||
|
||||
public final CommonPreference<Boolean> WIKIVOYAGE_FIRST_ACCESS = new BooleanPreference("wikivoyage_first_access", true).makeGlobal();
|
||||
|
||||
public final CommonPreference<Boolean> WIKIVOYAGE_SHOW_IMAGES_ASKED = new BooleanPreference("wikivoyage_show_images_asked", false).makeGlobal();
|
||||
public final CommonPreference<WikivoyageShowImages> WIKIVOYAGE_SHOW_IMAGES = new EnumIntPreference<>("wikivoyage_show_imgs", WikivoyageShowImages.OFF, WikivoyageShowImages.values()).makeGlobal();
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ import android.widget.EditText;
|
|||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import net.osmand.AndroidUtils;
|
||||
import net.osmand.IndexConstants;
|
||||
import net.osmand.Location;
|
||||
|
@ -63,6 +62,7 @@ import net.osmand.plus.views.MapControlsLayer;
|
|||
import net.osmand.plus.views.MapTileLayer;
|
||||
import net.osmand.plus.views.OsmandMapTileView;
|
||||
import net.osmand.plus.wikivoyage.WikivoyageWelcomeDialogFragment;
|
||||
import net.osmand.plus.wikivoyage.data.TravelDbHelper;
|
||||
import net.osmand.plus.wikivoyage.explore.WikivoyageExploreDialogFragment;
|
||||
import net.osmand.router.GeneralRouter;
|
||||
|
||||
|
@ -772,10 +772,12 @@ public class MapActivityActions implements DialogProvider {
|
|||
@Override
|
||||
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
|
||||
MapActivity.clearPrevActivityIntent();
|
||||
if (settings.WIKIVOYAGE_FIRST_ACCESS.get()) {
|
||||
TravelDbHelper travelDbHelper = getMyApplication().getTravelDbHelper();
|
||||
travelDbHelper.initTravelBooks();
|
||||
if (travelDbHelper.getSelectedTravelBook() == null) {
|
||||
WikivoyageWelcomeDialogFragment.showInstance(mapActivity.getSupportFragmentManager());
|
||||
} else {
|
||||
getMyApplication().getTravelDbHelper().initTravelBooks();
|
||||
|
||||
WikivoyageExploreDialogFragment.showInstance(mapActivity.getSupportFragmentManager());
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue