mirror of
https://github.com/ALEZ-DEV/Babylonia-terminal.git
synced 2025-12-16 01:18:50 +00:00
19 lines
541 B
Dart
19 lines
541 B
Dart
import 'package:babylonia_terminal_launcher/messages/github.pb.dart';
|
|
|
|
class Github {
|
|
static bool _isFetchingProtonVersions = false;
|
|
static Future<List<String>> getProtonVersions() async {
|
|
if (!_isFetchingProtonVersions) {
|
|
_isFetchingProtonVersions = true;
|
|
AskProtonVersions().sendSignalToRust();
|
|
final stream = ProtonVersions.rustSignalStream;
|
|
|
|
await for (final rustSignal in stream) {
|
|
_isFetchingProtonVersions = false;
|
|
return rustSignal.message.versions;
|
|
}
|
|
}
|
|
return [];
|
|
}
|
|
}
|