mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-20 04:39:04 +00:00
Fixes #1568
This commit is contained in:
parent
d24c9c7178
commit
329ed7f212
1 changed files with 4 additions and 1 deletions
|
|
@ -249,8 +249,11 @@ class SubscriptionFragment : BaseFragment<FragmentSubscriptionBinding>(), GemPur
|
|||
private fun checkIfNeedsCancellation() {
|
||||
if (user?.purchased?.plan?.paymentMethod == "Google" &&
|
||||
user?.purchased?.plan?.isActive == true &&
|
||||
user?.purchased?.plan?.dateTerminated == null &&
|
||||
(purchasedSubscription?.autoRenewing == false ||purchasedSubscription == null)) {
|
||||
compositeSubscription.add(apiClient.cancelSubscription().subscribe({
|
||||
compositeSubscription.add(apiClient.cancelSubscription()
|
||||
.flatMap { userRepository.retrieveUser(false, true) }
|
||||
.subscribe({
|
||||
refresh()
|
||||
}, RxErrorHandler.handleEmptyError()))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue