Skip to content

Commit

Permalink
Merge pull request #38 from pangeachat/freezing-fix
Browse files Browse the repository at this point in the history
more testing
  • Loading branch information
ggurdin authored Jan 16, 2024
2 parents 2b7ea2c + 96cda44 commit 39416ba
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 49 deletions.
6 changes: 0 additions & 6 deletions lib/pangea/controllers/subscription_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,10 @@ class SubscriptionController extends BaseController {
maxHeight: 600,
),
builder: (_) {
// try {
return SubscriptionPaywall(
pangeaController: _pangeaController,
);
// } catch (err) {
// print("error build modal bottom sheet: $err");
// return const SizedBox.shrink();
// }
},
// builder: (_) => const SizedBox.shrink(),
);
} catch (e, s) {
ErrorHandler.logError(e: e, s: s);
Expand Down
83 changes: 40 additions & 43 deletions lib/pangea/widgets/subscription/subscription_paywall.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
// Flutter imports:

import 'package:flutter/material.dart';

import 'package:flutter_gen/gen_l10n/l10n.dart';

import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/pangea/controllers/pangea_controller.dart';
import 'package:fluffychat/pangea/widgets/subscription/subscription_options.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';

class SubscriptionPaywall extends StatelessWidget {
final PangeaController pangeaController;
Expand All @@ -17,45 +14,45 @@ class SubscriptionPaywall extends StatelessWidget {

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
centerTitle: true,
leading: CloseButton(onPressed: Navigator.of(context).pop),
title: Text(
L10n.of(context)!.getAccess,
style: const TextStyle(
fontSize: 20,
),
textAlign: TextAlign.center,
),
),
return const Scaffold(
// appBar: AppBar(
// centerTitle: true,
// leading: CloseButton(onPressed: Navigator.of(context).pop),
// title: Text(
// L10n.of(context)!.getAccess,
// style: const TextStyle(
// fontSize: 20,
// ),
// textAlign: TextAlign.center,
// ),
// ),
body: Padding(
padding: const EdgeInsets.all(20),
child: ListView(
children: [
if (pangeaController.matrixState.client.rooms.length > 1) ...[
Text(
L10n.of(context)!.welcomeBack,
textAlign: TextAlign.center,
style: const TextStyle(fontSize: 16),
),
const SizedBox(height: 20),
],
Text(
L10n.of(context)!.subscriptionDesc,
textAlign: TextAlign.center,
style: const TextStyle(fontSize: 16),
),
const SizedBox(height: 20),
pangeaController.userController.inTrialWindow
? FreeTrialCard(
pangeaController: pangeaController,
)
: SubscriptionOptions(
pangeaController: pangeaController,
),
],
),
padding: EdgeInsets.all(20),
// child: ListView(
// children: [
// if (pangeaController.matrixState.client.rooms.length > 1) ...[
// Text(
// L10n.of(context)!.welcomeBack,
// textAlign: TextAlign.center,
// style: const TextStyle(fontSize: 16),
// ),
// const SizedBox(height: 20),
// ],
// Text(
// L10n.of(context)!.subscriptionDesc,
// textAlign: TextAlign.center,
// style: const TextStyle(fontSize: 16),
// ),
// const SizedBox(height: 20),
// pangeaController.userController.inTrialWindow
// ? FreeTrialCard(
// pangeaController: pangeaController,
// )
// : SubscriptionOptions(
// pangeaController: pangeaController,
// ),
// ],
// ),
),
);
}
Expand Down

0 comments on commit 39416ba

Please sign in to comment.