mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2025-08-06 18:24:25 +08:00
feat: fetch real data on the Latest Commit card
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import 'package:github/github.dart';
|
||||
import 'package:injectable/injectable.dart';
|
||||
import 'package:timeago/timeago.dart';
|
||||
|
||||
@lazySingleton
|
||||
class GithubAPI {
|
||||
@ -19,10 +20,10 @@ class GithubAPI {
|
||||
return dlurl;
|
||||
}
|
||||
|
||||
Future<DateTime?> latestCommitTime(String org, repoName) async {
|
||||
Future<String> latestCommitTime(String org, repoName) async {
|
||||
var repo = await github.repositories.getRepository(
|
||||
RepositorySlug(org, repoName),
|
||||
);
|
||||
return repo.pushedAt;
|
||||
return format(repo.pushedAt!);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user