mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2025-05-12 05:25:36 +02:00
feat: use github to get latest patches version if custom sources are used.
This commit is contained in:
parent
6e05120aa5
commit
b0c4567cb8
2 changed files with 28 additions and 3 deletions
|
@ -130,4 +130,18 @@ class GithubAPI {
|
|||
}
|
||||
return patches;
|
||||
}
|
||||
|
||||
Future<String> getLastestReleaseVersion(String repoName) async {
|
||||
try {
|
||||
Map<String, dynamic>? release = await _getLatestRelease(repoName);
|
||||
if (release != null) {
|
||||
return release['tag_name'];
|
||||
} else {
|
||||
return 'Unknown';
|
||||
}
|
||||
} on Exception catch (e, s) {
|
||||
await Sentry.captureException(e, stackTrace: s);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue