mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 18:03:14 +08:00
Add an easier way to toggle pro mode
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
class Features {
|
||||
static bool alwaysPro = false;
|
||||
static bool perFolderConfig = false;
|
||||
|
||||
static final all = <Feature>[
|
||||
|
@ -6,11 +6,16 @@ import 'package:in_app_purchase/in_app_purchase.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
import 'package:gitjournal/app.dart';
|
||||
import 'package:gitjournal/features.dart';
|
||||
import 'package:gitjournal/settings.dart';
|
||||
import 'package:gitjournal/utils/logger.dart';
|
||||
|
||||
class InAppPurchases {
|
||||
static Future<void> confirmProPurchaseBoot() async {
|
||||
if (Features.alwaysPro) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Settings.instance.proMode == false) {
|
||||
Log.i("confirmProPurchaseBoot: Pro Mode is false");
|
||||
return;
|
||||
|
@ -6,6 +6,7 @@ import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
import 'package:gitjournal/core/sorting_mode.dart';
|
||||
import 'package:gitjournal/features.dart';
|
||||
import 'package:gitjournal/folder_views/common.dart';
|
||||
import 'package:gitjournal/screens/note_editor.dart';
|
||||
|
||||
@ -44,7 +45,7 @@ class Settings extends ChangeNotifier {
|
||||
String folderViewHeaderType = "TitleGenerated";
|
||||
int version = 0;
|
||||
|
||||
bool proMode = false;
|
||||
bool proMode = Features.alwaysPro;
|
||||
String proExpirationDate = "";
|
||||
|
||||
String _pseudoId;
|
||||
|
Reference in New Issue
Block a user