Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove print statements from testing #43

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/pangea/controllers/class_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ class ClassController extends BaseController {
try {
//question for gabby: why do we need this in two places?
if (!_pangeaController.subscriptionController.isSubscribed) {
print("Unsubscribed user in class_controller. Showing paywall.");
await _pangeaController.subscriptionController.showPaywall(context);
}
} catch (err) {
Expand Down
12 changes: 2 additions & 10 deletions lib/pangea/controllers/subscription_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@ class SubscriptionController extends BaseController {
subscription?.currentSubscription?.isTrial ?? false;

Future<void> initialize() async {
print("Initializing subscription controller");
try {
if (_pangeaController.matrixState.client.userID == null) {
print(
debugPrint(
"Attempted to initalize subscription information with null userId",
);
return;
Expand All @@ -60,15 +59,11 @@ class SubscriptionController extends BaseController {
? WebSubscriptionInfo(pangeaController: _pangeaController)
: MobileSubscriptionInfo(pangeaController: _pangeaController);

print("Configuring subscription controller");
await subscription!.configure();
print("Configured subscription controller");

if (activatedNewUserTrial) {
setNewUserTrial();
}

print("Setting initalized true");
initialized = true;

if (!kIsWeb) {
Expand All @@ -94,7 +89,7 @@ class SubscriptionController extends BaseController {
}
setState();
} catch (e, s) {
print("Failed to initialize subscription controller");
debugPrint("Failed to initialize subscription controller");
ErrorHandler.logError(e: e, s: s);
}
}
Expand Down Expand Up @@ -136,9 +131,6 @@ class SubscriptionController extends BaseController {
BuildContext context, [
bool forceShow = false,
]) async {
print(
"User is not subscribed. Showing paywall. Initialized: $initialized",
);
try {
if (!initialized) {
await initialize();
Expand Down
Loading