mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-13 02:14:31 +01:00
refactor: disable firebase for now.
This commit is contained in:
parent
273aa42b17
commit
39401a78ec
2 changed files with 13 additions and 16 deletions
|
@ -17,7 +17,7 @@ import 'firebase_options.dart';
|
||||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||||
|
|
||||||
Future main() async {
|
Future main() async {
|
||||||
await dotenv.load(fileName: ".env");
|
await dotenv.load();
|
||||||
await ThemeManager.initialise();
|
await ThemeManager.initialise();
|
||||||
await setupLocator();
|
await setupLocator();
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
@ -25,19 +25,15 @@ Future main() async {
|
||||||
String apiUrl = locator<ManagerAPI>().getApiUrl();
|
String apiUrl = locator<ManagerAPI>().getApiUrl();
|
||||||
await locator<RevancedAPI>().initialize(apiUrl);
|
await locator<RevancedAPI>().initialize(apiUrl);
|
||||||
bool isSentryEnabled = locator<ManagerAPI>().isSentryEnabled();
|
bool isSentryEnabled = locator<ManagerAPI>().isSentryEnabled();
|
||||||
bool isCrashlyticsEnabled = locator<ManagerAPI>().isCrashlyticsEnabled();
|
// bool isCrashlyticsEnabled = locator<ManagerAPI>().isCrashlyticsEnabled();
|
||||||
// Remove this section if you are building from source and don't have firebase config
|
// Remove this section if you are building from source and don't have firebase config
|
||||||
if (isCrashlyticsEnabled) {
|
// if (isCrashlyticsEnabled) {
|
||||||
await Firebase.initializeApp(
|
// await Firebase.initializeApp();
|
||||||
options: DefaultFirebaseOptions.currentPlatform,
|
// Firebase.app().setAutomaticDataCollectionEnabled(true);
|
||||||
);
|
// } else {
|
||||||
Firebase.app().setAutomaticDataCollectionEnabled(true);
|
// await Firebase.initializeApp();
|
||||||
} else {
|
// Firebase.app().setAutomaticDataCollectionEnabled(false);
|
||||||
await Firebase.initializeApp(
|
// }
|
||||||
options: DefaultFirebaseOptions.currentPlatform,
|
|
||||||
);
|
|
||||||
Firebase.app().setAutomaticDataCollectionEnabled(false);
|
|
||||||
}
|
|
||||||
locator<GithubAPI>().initialize();
|
locator<GithubAPI>().initialize();
|
||||||
await locator<PatcherAPI>().initialize();
|
await locator<PatcherAPI>().initialize();
|
||||||
tz.initializeTimeZones();
|
tz.initializeTimeZones();
|
||||||
|
@ -62,9 +58,9 @@ Future main() async {
|
||||||
} as BeforeSendCallback?;
|
} as BeforeSendCallback?;
|
||||||
},
|
},
|
||||||
appRunner: () {
|
appRunner: () {
|
||||||
if (isCrashlyticsEnabled) {
|
// if (isCrashlyticsEnabled) {
|
||||||
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterError;
|
// FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterError;
|
||||||
}
|
// }
|
||||||
runApp(const MyApp());
|
runApp(const MyApp());
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
@ -92,3 +92,4 @@ flutter:
|
||||||
uses-material-design: true
|
uses-material-design: true
|
||||||
assets:
|
assets:
|
||||||
- assets/i18n/
|
- assets/i18n/
|
||||||
|
- .env
|
||||||
|
|
Loading…
Reference in a new issue