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

Re-enable to force users to login #268

Merged
merged 2 commits into from
Oct 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
12 changes: 7 additions & 5 deletions lib/src/providers/generate_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ import 'package:ankigpt/src/models/user_id.dart';
import 'package:ankigpt/src/providers/analytics_provider.dart';
import 'package:ankigpt/src/providers/clear_session_state_provider.dart';
import 'package:ankigpt/src/providers/current_usage_provider.dart';
import 'package:ankigpt/src/providers/has_account_provider.dart';
import 'package:ankigpt/src/providers/has_plus_provider.dart';
import 'package:ankigpt/src/providers/input_text_field_controller.dart';
import 'package:ankigpt/src/providers/logger/logger_provider.dart';
import 'package:ankigpt/src/providers/options_provider.dart';
import 'package:ankigpt/src/providers/router_provider.dart';
import 'package:ankigpt/src/providers/session_repository_provider.dart';
import 'package:ankigpt/src/providers/user_repository_provider.dart';
import 'package:ankigpt/src/providers/wants_to_generate_provider.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:cloud_functions/cloud_functions.dart';
import 'package:file_picker/file_picker.dart';
Expand Down Expand Up @@ -78,11 +80,11 @@ class GenerateNotifier extends _$GenerateNotifier {
_throwIfGpt4LimitReached(options.size, options.model);

// This code requires the user to have an account (anonymous doesn't count).
// if (!ref.read(hasAccount2Provider)) {
// ref.read(wantsToGenerateProvider.notifier).set(true);
// ref.read(routerProvider).go('/account');
// return;
// }
if (!ref.read(hasAccount2Provider)) {
ref.read(wantsToGenerateProvider.notifier).set(true);
ref.read(routerProvider).go('/account');
return;
}

state = const GenerateState.loading();

Expand Down
2 changes: 1 addition & 1 deletion lib/src/providers/generate_provider.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.