mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-21 13:19:02 +00:00
Fix #1113
This commit is contained in:
parent
a872f89326
commit
942a58bc23
1 changed files with 5 additions and 8 deletions
|
|
@ -94,17 +94,14 @@ class SubscriptionDetailsView : LinearLayout {
|
|||
}
|
||||
}
|
||||
|
||||
fun openSubscriptionWebsite() {
|
||||
private fun openSubscriptionWebsite() {
|
||||
if (plan?.paymentMethod != null) {
|
||||
val intent: Intent = if (plan?.paymentMethod == "Google") {
|
||||
Intent(Intent.ACTION_VIEW)
|
||||
.setComponent(ComponentName("com.android.vending",
|
||||
"com.google.android.finsky.activities.MainActivity"))
|
||||
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
val url = if (plan?.paymentMethod == "Google") {
|
||||
"https://play.google.com/store/account/subscriptions"
|
||||
} else {
|
||||
Intent(Intent.ACTION_VIEW, Uri.parse(BuildConfig.BASE_URL + "/"))
|
||||
BuildConfig.BASE_URL + "/"
|
||||
}
|
||||
context.startActivity(intent)
|
||||
context.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue