From e7018fcdb839c21672c05831b3a69617bf7d652b Mon Sep 17 00:00:00 2001 From: Arcao Date: Sun, 18 Feb 2018 16:16:08 +0100 Subject: [PATCH] [#93] Remove Geocache listing HTML code which load Geocache webpage (cherry picked from commit 6e778634a8548ac362d1f7aeb7515736d5ba4cf9) --- .../locus/api/mapper/GeocacheConverter.java | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/app/src/main/java/locus/api/mapper/GeocacheConverter.java b/app/src/main/java/locus/api/mapper/GeocacheConverter.java index 2d0b0c7a..dbbb6b30 100644 --- a/app/src/main/java/locus/api/mapper/GeocacheConverter.java +++ b/app/src/main/java/locus/api/mapper/GeocacheConverter.java @@ -16,7 +16,6 @@ import com.arcao.geocaching.api.data.type.GeocacheType; import com.arcao.geocaching.api.data.type.WaypointType; import com.arcao.geocaching.api.util.GeocachingUtils; -import com.arcao.geocaching4locus.App; import com.arcao.geocaching4locus.R; import com.arcao.geocaching4locus.base.constants.PrefConstants; @@ -46,8 +45,6 @@ final class GeocacheConverter { private static final String GEOCACHE_GUID_LINK_PREFIX = "http://www.geocaching.com/seek/cache_details.aspx?guid="; - private static final String LITE_GEOCACHE_LISTING_HTML = "" - + "

%2$s

"; private static final long WAYPOINT_BASE_ID = GeocachingUtils.base31Decode("N0"); private static final DateFormat @@ -64,7 +61,6 @@ final class GeocacheConverter { private final Context context; - private final boolean premiumMember; private final ImageDataConverter imageDataConverter; private final GeocacheLogConverter geocacheLogConverter; @@ -75,7 +71,6 @@ final class GeocacheConverter { GeocacheConverter(@NonNull Context context) { this.context = context.getApplicationContext(); - premiumMember = App.get(this.context).getAccountManager().isPremium(); SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context.getApplicationContext()); disableDnfNmNaGeocaches = preferences.getBoolean(PrefConstants.DOWNLOADING_DISABLE_DNF_NM_NA_CACHES, false); @@ -162,9 +157,6 @@ Waypoint createLocusWaypoint(@Nullable Geocache cache) { updateGeocacheLocationByCorrectedCoordinates(p, cache.userWaypoints()); - if (!premiumMember) - applyListingForBasicMembers(p); - if (disableDnfNmNaGeocaches) applyUnavailabilityForGeocache(p, disableDnfNmNaGeocachesThreshold); @@ -243,15 +235,6 @@ private int getLocusContainerType(@Nullable ContainerType containerType) { } } - private void applyListingForBasicMembers(@NonNull Waypoint p) { - if (p.gcData == null) - return; - - String longDescription = String.format(LITE_GEOCACHE_LISTING_HTML, p.gcData.getCacheUrlFull(), p.getName()); - p.gcData.setDescriptions("", false, longDescription, true); - } - - private void updateGeocacheLocationByCorrectedCoordinates(@NonNull Waypoint p, @Nullable Collection userWaypoints) { if (p.gcData == null || CollectionUtils.isEmpty(userWaypoints)) return;