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