From 977e812827fe47fae29d76d980e67a15cc1db17c Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Thu, 17 Oct 2024 13:18:29 -0300 Subject: [PATCH] WIP: hot fix localization_service --- .../localization/localization_service.dart | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/lib/shared/services/localization/localization_service.dart b/lib/shared/services/localization/localization_service.dart index 3784de0a..854f728a 100644 --- a/lib/shared/services/localization/localization_service.dart +++ b/lib/shared/services/localization/localization_service.dart @@ -79,24 +79,16 @@ class LocalizationService { } else if (isSelected) { return await processData(context); } else if (isAvailable) { + await StorageUtil().ensureInitialization(); return await processData(context); } else { - if (!isUnique && !isActive) { - log('() => not unique and not active'); - return false; - } else if (!isUnique && isInactived) { - log('() => not unique and inactived'); - return false; - } else if (!isUnique && isPending) { - log('() => not unique and pending'); - return false; - } else if (!isUnique && isBlocked) { - log('() => not unique and blocked'); - return false; - } else { - await StorageUtil().ensureInitialization(); - return await selectLocal(context); - } + await StorageUtil().ensureInitialization(); + if (!isUnique && !isActive) log('() => not unique and not active'); + else if (!isUnique && isInactived) log('() => not unique and inactived'); + else if (!isUnique && isPending) log('() => not unique and pending'); + else if (!isUnique && isBlocked) log('() => not unique and blocked'); + else log('() => else'); + return await selectLocal(context); } } catch (e, s) { log('() => stack: $s');