fixing edge case of no l2s

This commit is contained in:
William Jordan-Cooley 2024-10-14 17:00:15 -04:00
parent 5f0439d0d4
commit b463558b1a

View file

@ -27,7 +27,9 @@ class PangeaLanguage {
static Future<void> initialize() async {
try {
_langList = await _getCachedFlags();
if (await _shouldFetch || _langList.isEmpty) {
if (await _shouldFetch ||
_langList.isEmpty ||
_langList.every((lang) => !lang.l2)) {
_langList = await LanguageRepo.fetchLanguages();
await _saveFlags(_langList);