-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add billing payments to AccountViewModel
- Loading branch information
Showing
6 changed files
with
112 additions
and
19 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/state/AccountDialogState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package net.mullvad.mullvadvpn.compose.state | ||
|
||
sealed interface AccountDialogState { | ||
data object NoDialog: AccountDialogState | ||
|
||
data object VerificationError: AccountDialogState | ||
|
||
data object PurchaseError: AccountDialogState | ||
|
||
data object PurchaseComplete: AccountDialogState | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/state/PaymentState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package net.mullvad.mullvadvpn.compose.state | ||
|
||
import net.mullvad.mullvadvpn.lib.payment.PaymentProduct | ||
|
||
sealed interface PaymentState { | ||
data object Loading : PaymentState | ||
|
||
data object NoPayment : PaymentState | ||
|
||
data object GenericError : PaymentState | ||
|
||
data object BillingError : PaymentState | ||
|
||
data class PaymentAvailable(val products: List<PaymentProduct>): PaymentState | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters