diff --git a/lib/main.dart b/lib/main.dart index e8dc7049..eef3a22d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -19,34 +19,35 @@ Future main() async { await locator().initialize(); String apiUrl = locator().getApiUrl(); await locator().initialize(apiUrl); - bool isSentryEnabled = locator().isSentryEnabled(); + // bool isSentryEnabled = locator().isSentryEnabled(); locator().initialize(); await locator().initialize(); tz.initializeTimeZones(); // Remove this section if you are building from source and don't have sentry configured - await SentryFlutter.init( - (options) { - options - ..dsn = isSentryEnabled ? '' : '' - ..environment = 'alpha' - ..release = '0.1' - ..tracesSampleRate = 1.0 - ..anrEnabled = true - ..enableOutOfMemoryTracking = true - ..sampleRate = isSentryEnabled ? 1.0 : 0.0 - ..beforeSend = (event, hint) { - if (isSentryEnabled) { - return event; - } else { - return null; - } - } as BeforeSendCallback?; - }, - appRunner: () { - runApp(const MyApp()); - }, - ); + // await SentryFlutter.init( + // (options) { + // options + // ..dsn = isSentryEnabled ? '' : '' + // ..environment = 'alpha' + // ..release = '0.1' + // ..tracesSampleRate = 1.0 + // ..anrEnabled = true + // ..enableOutOfMemoryTracking = true + // ..sampleRate = isSentryEnabled ? 1.0 : 0.0 + // ..beforeSend = (event, hint) { + // if (isSentryEnabled) { + // return event; + // } else { + // return null; + // } + // } as BeforeSendCallback?; + // }, + // appRunner: () { + // runApp(const MyApp()); + // }, + // ); + runApp(const MyApp()); } class MyApp extends StatelessWidget { diff --git a/lib/services/manager_api.dart b/lib/services/manager_api.dart index af5c3157..79b57ab0 100644 --- a/lib/services/manager_api.dart +++ b/lib/services/manager_api.dart @@ -82,13 +82,13 @@ class ManagerAPI { await _prefs.setBool('useDarkTheme', value); } - bool isSentryEnabled() { - return _prefs.getBool('sentryEnabled') ?? true; - } + // bool isSentryEnabled() { + // return _prefs.getBool('sentryEnabled') ?? true; + // } - Future setSentryStatus(bool value) async { - await _prefs.setBool('sentryEnabled', value); - } + // Future setSentryStatus(bool value) async { + // await _prefs.setBool('sentryEnabled', value); + // } Future deleteTempFolder() async { final Directory dir = Directory('/data/local/tmp/revanced-manager'); diff --git a/lib/ui/views/settings/settings_view.dart b/lib/ui/views/settings/settings_view.dart index fdbacf2c..69d49883 100644 --- a/lib/ui/views/settings/settings_view.dart +++ b/lib/ui/views/settings/settings_view.dart @@ -187,28 +187,28 @@ class SettingsView extends StatelessWidget { ], ), _settingsDivider, - SettingsSection( - title: 'settingsView.logsSectionTitle', - children: [ - CustomSwitchTile( - padding: const EdgeInsets.symmetric(horizontal: 20.0), - title: I18nText( - 'settingsView.sentryLabel', - child: const Text( - '', - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.w500, - ), - ), - ), - subtitle: I18nText('settingsView.sentryHint'), - value: model.isSentryEnabled(), - onTap: (value) => model.useSentry(value), - ), - ], - ), - _settingsDivider, + // SettingsSection( + // title: 'settingsView.logsSectionTitle', + // children: [ + // CustomSwitchTile( + // padding: const EdgeInsets.symmetric(horizontal: 20.0), + // title: I18nText( + // 'settingsView.sentryLabel', + // child: const Text( + // '', + // style: TextStyle( + // fontSize: 20, + // fontWeight: FontWeight.w500, + // ), + // ), + // ), + // subtitle: I18nText('settingsView.sentryHint'), + // value: model.isSentryEnabled(), + // onTap: (value) => model.useSentry(value), + // ), + // ], + // ), + // _settingsDivider, SettingsSection( title: 'settingsView.infoSectionTitle', children: [ diff --git a/lib/ui/views/settings/settings_viewmodel.dart b/lib/ui/views/settings/settings_viewmodel.dart index 728815b9..15dc7867 100644 --- a/lib/ui/views/settings/settings_viewmodel.dart +++ b/lib/ui/views/settings/settings_viewmodel.dart @@ -315,17 +315,15 @@ class SettingsViewModel extends BaseViewModel { ); } - // disable sentry using switch boolean + // bool isSentryEnabled() { + // return _managerAPI.isSentryEnabled(); + // } - bool isSentryEnabled() { - return _managerAPI.isSentryEnabled(); - } - - void useSentry(bool value) { - _managerAPI.setSentryStatus(value); - _toast.showBottom('settingsView.restartAppForChanges'); - notifyListeners(); - } + // void useSentry(bool value) { + // _managerAPI.setSentryStatus(value); + // _toast.showBottom('settingsView.restartAppForChanges'); + // notifyListeners(); + // } void deleteKeystore() { _managerAPI.deleteKeystore();