mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2026-01-24 11:41:01 +00:00
revert: "refactor: update deprecated and minor code refactors (#710)"
This reverts commit 6829d3cdea.
Signed-off-by: EvadeMaster <93124920+EvadeMaster@users.noreply.github.com>
This commit is contained in:
@@ -7,14 +7,11 @@ import 'package:sentry_flutter/sentry_flutter.dart';
|
||||
|
||||
@lazySingleton
|
||||
class CrowdinAPI {
|
||||
CrowdinAPI() {
|
||||
initialize();
|
||||
}
|
||||
Dio _dio = Dio();
|
||||
DioCacheManager get _dioCacheManager => DioCacheManager(CacheConfig());
|
||||
String get apiKey => Environment.crowdinKEY;
|
||||
late Dio _dio = Dio();
|
||||
final DioCacheManager _dioCacheManager = DioCacheManager(CacheConfig());
|
||||
final apiKey = Environment.crowdinKEY;
|
||||
|
||||
void initialize() {
|
||||
Future<void> initialize() async {
|
||||
try {
|
||||
_dio = Dio(
|
||||
BaseOptions(
|
||||
@@ -27,7 +24,7 @@ class CrowdinAPI {
|
||||
captureFailedRequests: true,
|
||||
);
|
||||
} on Exception catch (e, s) {
|
||||
Sentry.captureException(e, stackTrace: s).ignore();
|
||||
await Sentry.captureException(e, stackTrace: s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +32,7 @@ class CrowdinAPI {
|
||||
try {
|
||||
await _dioCacheManager.clearAll();
|
||||
} on Exception catch (e, s) {
|
||||
Sentry.captureException(e, stackTrace: s).ignore();
|
||||
await Sentry.captureException(e, stackTrace: s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +56,7 @@ class CrowdinAPI {
|
||||
|
||||
return targetLanguages;
|
||||
} on Exception catch (e, s) {
|
||||
Sentry.captureException(e, stackTrace: s).ignore();
|
||||
await Sentry.captureException(e, stackTrace: s);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user