Merge pull request #28 from pangeachat/lang-list-fix

fix for fetching language list
pull/1011/head
ggurdin 2 years ago committed by GitHub
commit eaf91a5be9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -27,7 +27,6 @@ class Environment {
} }
static String get choreoApi { static String get choreoApi {
return "http://localhost:8000/choreo";
return dotenv.env['CHOREO_API'] ?? 'Not found'; return dotenv.env['CHOREO_API'] ?? 'Not found';
} }

@ -58,6 +58,12 @@ class PangeaLanguage {
return true; return true;
} }
// return true; // return true;
final DateTime lastFetchedDate = DateTime.parse(dateString);
final DateTime targetDate = DateTime(2024, 1, 15);
if (lastFetchedDate.isBefore(targetDate)) {
return true;
}
final int lastFetched = DateTime.parse(dateString).millisecondsSinceEpoch; final int lastFetched = DateTime.parse(dateString).millisecondsSinceEpoch;
final int now = DateTime.now().millisecondsSinceEpoch; final int now = DateTime.now().millisecondsSinceEpoch;
const int fetchIntervalInMilliseconds = 86534601; const int fetchIntervalInMilliseconds = 86534601;

Loading…
Cancel
Save