fix: don't allow users to have same base and target short langCode (#1854)
This commit is contained in:
parent
32d314c026
commit
05a046de63
1 changed files with 6 additions and 4 deletions
|
|
@ -73,8 +73,9 @@ class SettingsLearningView extends StatelessWidget {
|
|||
isL2List: false,
|
||||
decorationText: L10n.of(context).myBaseLanguage,
|
||||
validator: (lang) {
|
||||
if (lang ==
|
||||
controller.selectedTargetLanguage) {
|
||||
if (lang?.langCodeShort ==
|
||||
controller.selectedTargetLanguage
|
||||
?.langCodeShort) {
|
||||
return L10n.of(context)
|
||||
.noIdenticalLanguages;
|
||||
}
|
||||
|
|
@ -93,8 +94,9 @@ class SettingsLearningView extends StatelessWidget {
|
|||
isL2List: true,
|
||||
decorationText: L10n.of(context).iWantToLearn,
|
||||
validator: (lang) {
|
||||
if (lang ==
|
||||
controller.selectedSourceLanguage) {
|
||||
if (lang?.langCodeShort ==
|
||||
controller.selectedSourceLanguage
|
||||
?.langCodeShort) {
|
||||
return L10n.of(context)
|
||||
.noIdenticalLanguages;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue