Skip to content

Commit

Permalink
sub page tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipthelen committed Oct 16, 2024
1 parent d2880b7 commit 1aa3f66
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 18 deletions.
2 changes: 2 additions & 0 deletions Habitica/res/layout/activity_gift_subscription.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:text="@string/gift_subscription_subtitle"
android:textSize="17sp"
android:fontFamily="@string/font_family_medium"
android:textColor="@color/white"
android:layout_marginStart="@dimen/spacing_large"
android:layout_marginEnd="@dimen/spacing_large" />
Expand Down
18 changes: 15 additions & 3 deletions Habitica/res/layout/subscription_details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:padding="4dp"
android:textSize="15sp"
android:paddingHorizontal="16dp"
android:paddingVertical="4dp"
android:text="@string/subscription_credit_canceling"
android:textColor="@color/green_500" />

Expand Down Expand Up @@ -82,7 +83,7 @@

<TextView
android:id="@+id/subscriptionStatusNotRecurring"
style="@style/Pill.Selected.Yellow"
style="@style/Pill.Selected.Yellow.Bright"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
Expand Down Expand Up @@ -269,6 +270,17 @@
android:textSize="12sp"
android:layout_marginHorizontal="64dp"
android:textColor="@color/white" />

<TextView
android:id="@+id/resubscribe_for_hourglasses_label"
style="@style/subscriptionBoxCompactText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginHorizontal="64dp"
android:text="@string/resubscribe_for_hourglasses"
android:gravity="center"
android:visibility="gone"/>
</RelativeLayout>

</LinearLayout>
Expand Down Expand Up @@ -303,8 +315,8 @@
style="@style/subscriptionBoxText.Subtitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:lineHeight="20sp"
android:text="@string/cancel_subscription_notgoogle_description" />

<Button
Expand Down
14 changes: 7 additions & 7 deletions Habitica/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@
<string name="active">Active</string>
<string name="due">Due</string>
<string name="cancel_subscription">Cancel Subscription</string>
<string name="cancel_subscription_google_description">No longer want to subscribe? You can find the option to unsubscribe by going to the Payments & Subscriptions section of the Google Play Store app. Any leftover months of subscription credit will be added to your end date after cancellation.</string>
<string name="cancel_subscription_google_description">No longer want to subscribe? You can find the option to unsubscribe by going to the Payments &amp; Subscriptions section of the Google Play Store app. Any leftover months of subscription credit will be added to your end date after cancellation.</string>
<string name="cancel_subscription_notgoogle_description">No longer want to subscribe? Due to your payment method, you’ll need to unsubscribe from our website. To do this, tap the button below, log in to your account, tap the player icon in the top right, then go to the Subscription section. Any leftover months of subscription credit will be added to your end date after cancellation. We’ll miss you!</string>
<string name="cancel_subscription_apple_description">No longer want to subscribe? Due to your payment method, you’ll need to unsubscribe through your Apple ID subscription settings on your iOS device.</string>
<string name="visit_habitica_website">Visit Habitica Website</string>
Expand All @@ -436,7 +436,7 @@
<string name="one_month">1 Month</string>
<string name="x_months">%d Months</string>
<string name="month">Month</string>
<string name="three_months">3 mMnths</string>
<string name="three_months">3 Months</string>
<string name="six_months">6 Months</string>
<string name="twelve_months">12 Months</string>
<string name="subscribe_prompt_thanks">You get these benefits for being a Subscriber</string>
Expand Down Expand Up @@ -770,7 +770,7 @@
<string name="gift_title">Who would you like to gift to?</string>
<string name="gift_one_get_one">Gift one, Get one!</string>
<string name="gift_one_get_one_detailed_description">While this promotion is active, you’ll receive a matching subscription automatically after sending your gift.</string>
<string name="gift_subscription_subtitle">Choose the subscription you’d like to gift below! This purchase won’t automatically renew.</string>
<string name="gift_subscription_subtitle">Choose the subscription you’d like to gift! This purchase won’t renew.</string>
<string name="gift_gems_subtitle">Choose the gem packet you’d like to gift below!</string>
<string name="server">Server</string>
<string name="gift_confirmation_title">Your gift was sent!</string>
Expand Down Expand Up @@ -1172,10 +1172,10 @@
<string name="g1g1_promo_info_instructions">Tap ‘Gift a Subscription’ and type in the username of the account you’d like to gift to. From there, pick the sub length you’d like to gift and check out. Your account will automatically be rewarded with the same level of subscription you just gifted.</string>
<string name="g1g1_promo_info_limitations_fixed">This is a limited time event that starts on %1$s (%2$s) and will end %3$s (%4$s). This promotion only applies when you gift to another Habitican. If you or your gift recipient already have a subscription, the gifted subscription will add months of credit that will only be used after the current subscription is cancelled or expires.</string>
<string name="gift_one_get_one_purchase_banner">Gift a sub and get a sub for free until %s</string>
<string name="one_month_one_time">1 month</string>
<string name="three_months_one_time">3 months</string>
<string name="six_months_one_time">6 months</string>
<string name="twelve_months_one_time">12 months</string>
<string name="one_month_one_time">1 Month</string>
<string name="three_months_one_time">3 Months</string>
<string name="six_months_one_time">6 Months</string>
<string name="twelve_months_one_time">12 Months</string>
<string name="sidebar_teams">Teams</string>
<string name="team_information">Team Information</string>
<string name="mystery_item_title">You open the Mystery Box and find…</string>
Expand Down
1 change: 0 additions & 1 deletion Habitica/res/values/values.xml
Original file line number Diff line number Diff line change
Expand Up @@ -275,5 +275,4 @@
<item>@string/spirituality</item>
<item>@string/time_management</item>
</string-array>

</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ class AppConfigManager(contentRepository: ContentRepository) :
if (promo == null && remoteConfig.getString("activePromo").isNotBlank()) {
promo = getHabiticaPromotionFromKey(remoteConfig.getString("activePromo"), null, null)
}
if (promo?.isActive != true) {
return null
}
if (promo is HabiticaWebPromotion) {
promo.url = surveyURL()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ class DeathActivity : BaseActivity(), SnackbarActivity {
binding.unsubbedWrapper.visibility = View.GONE
} else if (it?.isSubscribed == false) {
binding.reviveSubscriberWrapper.visibility = View.GONE
binding.subscriberBenefitUsedView.visibility = View.GONE
binding.unsubbedWrapper.visibility = View.VISIBLE
binding.subscribeModalButton.setOnClickListener {
Analytics.sendEvent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,11 @@ class SubscriptionDetailsView : LinearLayout {
}
val nextHourglassMonth = nextHourglassDate.format(DateTimeFormatter.ofPattern(format))
nextHourglassMonth?.let { binding.nextHourglassTextview.text = it }
binding.resubscribeForHourglassesLabel.visibility = View.GONE
} else {
binding.nextHourglassTextview.visibility = View.GONE
binding.nextHourglassLabel.visibility = View.VISIBLE
binding.nextHourglassLabel.text = resources.getString(R.string.resubscribe_for_hourglasses)
binding.nextHourglassLabel.visibility = View.GONE
binding.resubscribeForHourglassesLabel.visibility = View.VISIBLE
}

binding.changeSubscriptionButton.visibility = View.VISIBLE
Expand Down
4 changes: 2 additions & 2 deletions version.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
NAME=4.4.3
CODE=8211
NAME=4.5.0
CODE=8651

0 comments on commit 1aa3f66

Please sign in to comment.