Skip to content

Commit

Permalink
Show custom payment options in Russia even for Play Store installs
Browse files Browse the repository at this point in the history
  • Loading branch information
oxtoacart committed Sep 27, 2023
1 parent ee79e66 commit 842e71f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 3 additions & 4 deletions lib/common/session_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,14 @@ class SessionModel extends Model {
'playVersion',
false,
);
proxyAvailable = singleValueNotifier(
'hasSucceedingProxy',
true,
);
proxyAvailable = singleValueNotifier('hasSucceedingProxy', true);
country = singleValueNotifier('geo_country_code', 'US');
}

ValueNotifier<bool> networkAvailable = ValueNotifier(true);
late ValueNotifier<bool?> isPlayVersion;
late ValueNotifier<bool?> proxyAvailable;
late ValueNotifier<String?> country;

Widget proUser(ValueWidgetBuilder<bool> builder) {
return subscribedSingleValueBuilder<bool>('prouser', builder: builder);
Expand Down
3 changes: 2 additions & 1 deletion lib/plans/plan_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ class PlanCard extends StatelessWidget {
child: CInkWell(
onTap: () async {
final isPlayVersion = sessionModel.isPlayVersion.value ?? false;
final inRussia = sessionModel.country.value == 'RU';

// * Play version
if (isPlayVersion) {
if (isPlayVersion && !inRussia) {
await sessionModel
.submitGooglePlay(planName)
.onError((error, stackTrace) {
Expand Down

0 comments on commit 842e71f

Please sign in to comment.