WIP
This commit is contained in:
parent
9f76462e78
commit
0ce19d81b7
|
@ -59,7 +59,7 @@ class LocalizationService {
|
|||
final bool isInactived = _isInactived(locals);
|
||||
final bool isPending = _isPending(locals);
|
||||
final bool isUnique = locals.length == 1;
|
||||
final bool isBlocked = locals[0]['CLU_STATUS'] == 'B';
|
||||
final bool isBlocked = locals.where((local) => local['CLU_STATUS'] == 'B').isNotEmpty;
|
||||
final bool isEnabled = isUnique && isActive;
|
||||
final bool isDisabled = isUnique && isBlocked;
|
||||
final bool isUnselected = _isUnselected();
|
||||
|
@ -80,21 +80,23 @@ class LocalizationService {
|
|||
return await processData(context);
|
||||
} else if (isAvailable) {
|
||||
return await processData(context);
|
||||
} else if (!isUnique && !isActive) {
|
||||
log('() => not unique and not active');
|
||||
} 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 if (!isUnique && isBlocked) {
|
||||
log('() => not unique and blocked');
|
||||
return false;
|
||||
} else if (!isUnique && isPending) {
|
||||
log('() => not unique and pending');
|
||||
return false;
|
||||
} else if (!isUnique && isInactived) {
|
||||
log('() => not unique and inactived');
|
||||
return false;
|
||||
} else {
|
||||
await StorageUtil().ensureInitialization();
|
||||
return await selectLocal(context);
|
||||
} else {
|
||||
await StorageUtil().ensureInitialization();
|
||||
return await selectLocal(context);
|
||||
}
|
||||
}
|
||||
} catch (e, s) {
|
||||
log('() => stack: $s');
|
||||
|
|
Loading…
Reference in New Issue