diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java index c3c3afc91a..66914d8d44 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java @@ -108,7 +108,7 @@ public class LiveUpdatesFragment extends BaseOsmAndFragment { //getSettings().LIVE_UPDATES_PURCHASED.set(true); subscriptionHeader = inflater.inflate(R.layout.live_updates_header, listView, false); - updateHeader(); + updateSubscriptionHeader(); listView.addHeaderView(subscriptionHeader); @@ -116,7 +116,7 @@ public class LiveUpdatesFragment extends BaseOsmAndFragment { return view; } - public void updateHeader() { + public void updateSubscriptionHeader() { View subscriptionBanner = subscriptionHeader.findViewById(R.id.subscription_banner); View subscriptionInfo = subscriptionHeader.findViewById(R.id.subscription_info); if (getSettings().LIVE_UPDATES_PURCHASED.get()) { @@ -176,18 +176,6 @@ public class LiveUpdatesFragment extends BaseOsmAndFragment { } } - public void updateSubscriptionBanner() { - View subscriptionBanner = subscriptionHeader.findViewById(R.id.subscription_banner); - View subscriptionInfo = subscriptionHeader.findViewById(R.id.subscription_info); - if (InAppHelper.isSubscribedToLiveUpdates()) { - subscriptionBanner.setVisibility(View.GONE); - subscriptionInfo.setVisibility(View.VISIBLE); - } else { - subscriptionBanner.setVisibility(View.VISIBLE); - subscriptionInfo.setVisibility(View.GONE); - } - } - @Override public void onDestroyView() { super.onDestroyView(); diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/SubscriptionFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/SubscriptionFragment.java index 8457878349..c8cb879200 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/SubscriptionFragment.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/SubscriptionFragment.java @@ -4,7 +4,6 @@ import android.app.Activity; import android.app.ProgressDialog; import android.os.Bundle; import android.support.v4.app.Fragment; -import android.util.Log; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; @@ -226,7 +225,7 @@ public class SubscriptionFragment extends BaseOsmAndDialogFragment implements In Fragment parent = getParentFragment(); if (parent != null && parent instanceof LiveUpdatesFragment) { - ((LiveUpdatesFragment) parent).updateHeader(); + ((LiveUpdatesFragment) parent).updateSubscriptionHeader(); } dismiss(); @@ -330,7 +329,7 @@ public class SubscriptionFragment extends BaseOsmAndDialogFragment implements In if (InAppHelper.getSkuLiveUpdates().equals(sku)) { Fragment parentFragment = getParentFragment(); if (parentFragment instanceof LiveUpdatesFragment) { - ((LiveUpdatesFragment) parentFragment).updateSubscriptionBanner(); + ((LiveUpdatesFragment) parentFragment).updateSubscriptionHeader(); } }