From 2a220c398422a370883dd5c51a2f0b7c59116dd4 Mon Sep 17 00:00:00 2001 From: Aunali321 Date: Tue, 1 Nov 2022 19:03:30 +0530 Subject: [PATCH] fix: custom sources. --- lib/services/github_api.dart | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/lib/services/github_api.dart b/lib/services/github_api.dart index 7a3fa3bf..ffc26df1 100644 --- a/lib/services/github_api.dart +++ b/lib/services/github_api.dart @@ -5,9 +5,7 @@ import 'package:dio/dio.dart'; import 'package:dio_http_cache_lts/dio_http_cache_lts.dart'; import 'package:flutter_cache_manager/flutter_cache_manager.dart'; import 'package:injectable/injectable.dart'; -import 'package:native_dio_client/native_dio_client.dart'; import 'package:revanced_manager/models/patch.dart'; -import 'package:revanced_manager/utils/check_for_gms.dart'; import 'package:sentry_flutter/sentry_flutter.dart'; import 'package:sentry_dio/sentry_dio.dart'; @@ -32,20 +30,10 @@ class GithubAPI { void initialize() async { try { - bool isGMSInstalled = await checkForGMS(); + _dio = Dio(BaseOptions( + baseUrl: 'https://api.github.com', + )); - if (!isGMSInstalled) { - _dio = Dio(BaseOptions( - baseUrl: 'https://api.github.com', - )); - print('GitHub API: Using default engine + $isGMSInstalled'); - } else { - _dio = Dio(BaseOptions( - baseUrl: 'https://api.github.com', - )) - ..httpClientAdapter = NativeAdapter(); - print('ReVanced API: Using CronetEngine + $isGMSInstalled'); - } _dio.interceptors.add(_dioCacheManager.interceptor); _dio.addSentry( captureFailedRequests: true,