This commit is contained in:
Phillip Thelen 2019-11-26 17:37:01 +01:00
parent 636f51b4e4
commit b22a4b14ad
5 changed files with 15 additions and 21 deletions

View file

@ -174,14 +174,13 @@
android:layout_gravity="center_horizontal"
android:src="@drawable/gift_sub_gift"
android:layout_marginTop="24dp"
android:layout_marginBottom="2dp" />
android:layout_marginBottom="6dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/gray_300"
android:text="@string/gems_gift_description"
android:gravity="center_horizontal"
style="@style/Body2"
android:layout_marginLeft="@dimen/spacing_large"
android:layout_marginRight="@dimen/spacing_large"/>
<Button

View file

@ -331,7 +331,7 @@
android:layout_gravity="center_horizontal"
android:src="@drawable/gift_sub_gift"
android:layout_marginTop="24dp"
android:layout_marginBottom="2dp" />
android:layout_marginBottom="6dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"

View file

@ -408,8 +408,8 @@
<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 in the “My Apps” section of the Google Play Store.</string>
<string name="cancel_subscription_notgoogle_description">No longer want to subscribe? Due to constraints on mobile payments, you\'ll need to cancel via our website. To do this, tap the button below, log in to your account, tap the User icon in the top right, then go to Subscription. We\'ll miss you!</string>
<string name="cancel_subscription_google_description">No longer want to subscribe? You can find the option to unsubscribe in the “My Apps” section of the Google Play Store. Any months of subscription credit will be applied after your subscription has ended.</string>
<string name="cancel_subscription_notgoogle_description">No longer want to subscribe? Due to constraints on mobile payments, you\'ll need to cancel via our website. To do this, tap the button below, log in to your account, tap the User icon in the top right, then go to Subscription. Any months of subscription credit will be applied after your subscription has ended. We\'ll miss you! </string>
<string name="visit_habitica_website">Visit Habitica Website</string>
<string name="current_bonuses">Current Bonuses</string>
<string name="months_subscribed">Months subscribed</string>
@ -908,8 +908,9 @@
<string name="save_20">Save 20%</string>
<string name="subscription_credit">Subscription Credit</string>
<string name="group_plan">Group Plan</string>
<string name="cancel_subscription_group_plan">"You have a free subscription because you are a member a Party or Guild that has a Group Plan. This will end if you leave or the Group Plan is cancelled by the owner. Any months of extra subscription credit you have will be applied at the end of the Group Plan. "</string>
<string name="cancel_subscription_group_plan_owner">"You have a free subscription because you are an owner of a Party or Guild that has a Group Plan. This will end if you cancel the plan. Any months of extra subscription credit you have will be applied at the end of the Group Plan. You can cancel from the Habitica website. "</string>
<string name="cancel_subscription_group_plan">You have a free subscription because you are a member a Party or Guild that has a Group Plan. This will end if you leave or the Group Plan is cancelled by the owner. Any months of extra subscription credit you have will be applied at the end of the Group Plan.</string>
<string name="cancel_subscription_group_plan_owner">You have a free subscription because you are an owner of a Party or Guild that has a Group Plan. This will end if you cancel the plan. Any months of extra subscription credit you have will be applied at the end of the Group Plan. You can cancel from the Habitica website.</string>
<string name="owner">Owner</string>
<string name="member">Member</string>
<string name="member_group_plan">Member of a Group Plan</string>
</resources>

View file

@ -61,7 +61,7 @@ class NotificationOpenHandler {
MainNavigationController.navigate(R.id.prefsActivity)
}
private fun handleChatMessage(type: String, groupID: String) {
private fun handleChatMessage(type: String?, groupID: String) {
when (type) {
"party" -> MainNavigationController.navigate(R.id.partyFragment)
"tavern" -> MainNavigationController.navigate(R.id.tavernFragment)

View file

@ -59,16 +59,10 @@ class SubscriptionDetailsView : LinearLayout {
}
}
if (duration != null) {
binding.subscriptionDurationTextView.text = resources.getString(R.string.subscription_duration, duration)
} else if (plan.isGroupPlanSub) {
if (plan.ownerID == currentUserID) {
binding.subscriptionDurationTextView.setText(R.string.owner)
} else {
binding.subscriptionDurationTextView.setText(R.string.member)
}
} else if (plan.dateTerminated != null) {
binding.subscriptionDurationTextView.text = resources.getString(R.string.ending_on, DateFormat.getDateInstance().format(plan.dateTerminated ?: Date()))
when {
duration != null -> binding.subscriptionDurationTextView.text = resources.getString(R.string.subscription_duration, duration)
plan.isGroupPlanSub -> binding.subscriptionDurationTextView.setText(R.string.member_group_plan)
plan.dateTerminated != null -> binding.subscriptionDurationTextView.text = resources.getString(R.string.ending_on, DateFormat.getDateInstance().format(plan.dateTerminated ?: Date()))
}
if (plan.extraMonths > 0) {
@ -114,12 +108,12 @@ class SubscriptionDetailsView : LinearLayout {
binding.changeSubscriptionButton.setText(R.string.open_in_store)
} else {
if (plan.isGroupPlanSub) {
if (plan.ownerID == currentUserID) {
/*if (plan.ownerID == currentUserID) {
binding.changeSubscriptionDescription.setText(R.string.cancel_subscription_group_plan_owner)
} else {
} else {*/
binding.changeSubscriptionDescription.setText(R.string.cancel_subscription_group_plan)
binding.changeSubscriptionButton.visibility = View.GONE
}
//}
} else {
binding.changeSubscriptionDescription.setText(R.string.cancel_subscription_notgoogle_description)
}