fixing edge case of no l2s
This commit is contained in:
parent
5f0439d0d4
commit
b463558b1a
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue