refactor: slight format change

This is so unreadable, there must've been a better way to do this.
This commit is contained in:
Pun Butrach 2024-03-28 05:26:35 +00:00 committed by GitHub
parent 63d83a43ad
commit 9a66357f7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -63,9 +63,11 @@ class SUpdateLanguage extends BaseViewModel {
child: ListBody(
children: [
RadioListTile(
// TODO(Someone): There must've been a better way to do this.
title: Text(currentlyUsedLanguage.englishName),
subtitle: Text(
'${currentlyUsedLanguage.nativeName} (${LocaleSettings.currentLocale.languageCode}${LocaleSettings.currentLocale.countryCode != null ? '-${LocaleSettings.currentLocale.countryCode}' : ''})'),
'${currentlyUsedLanguage.nativeName} (${LocaleSettings.currentLocale.languageCode}${LocaleSettings.currentLocale.countryCode != null ? '-${LocaleSettings.currentLocale.countryCode}' : ''})',
),
value:
'${LocaleSettings.currentLocale.languageCode}-${LocaleSettings.currentLocale.countryCode}' ==
selectedLanguageCode.value,
@ -110,6 +112,7 @@ class SUpdateLanguage extends BaseViewModel {
),
TextButton(
onPressed: () {
// TODO(nullcube): Translation will not update until we refresh the page.
updateLocale(selectedLanguageCode.value);
Navigator.of(context).pop();
},