feat: Add a toggle for alternative sources (#1686)

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
aAbed
2024-02-19 20:26:42 +05:45
committed by GitHub
parent ce5088ab53
commit f89c742c90
11 changed files with 116 additions and 61 deletions

View File

@ -33,7 +33,7 @@ class RevancedAPI {
final response = await _dio.get('/contributors');
final List<dynamic> repositories = response.data['repositories'];
for (final Map<String, dynamic> repo in repositories) {
final String name = repo['name'].toLowerCase();
final String name = repo['name'];
contributors[name] = repo['contributors'];
}
} on Exception catch (e) {
@ -58,7 +58,7 @@ class RevancedAPI {
final List<dynamic> tools = response.data['tools'];
return tools.firstWhereOrNull(
(t) =>
(t['repository'] as String).toLowerCase() == repoName.toLowerCase() &&
(t['repository'] as String) == repoName &&
(t['name'] as String).endsWith(extension),
);
} on Exception catch (e) {