File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ public partial class MainViewModel : ObservableRecipient,
7676 private bool _isViewToNicConfigDetail ;
7777
7878 [ ObservableProperty ]
79- private ObservableCollection < CultureInfo > _languages ;
79+ private ObservableCollection < CultureInfo > _languages = null ! ;
8080
8181 [ ObservableProperty ]
8282 private int _selectedIPConfigsCount ;
@@ -141,9 +141,6 @@ public MainViewModel()
141141
142142 BindingOperations . EnableCollectionSynchronization ( AllNics , _syncLock ) ;
143143
144- var cultures = LangSource . GetAvailableCultures ( ) . OrderBy ( x => x . Name ) ;
145- Languages = new ( cultures ) ;
146-
147144 LangSource . Instance . LanguageChanged += ( s , e ) => {
148145 // 更新 ToolTip 信息。
149146 OnPropertyChanged ( nameof ( SelectedNic ) ) ;
@@ -328,6 +325,9 @@ private void GoBack()
328325 [ RelayCommand ]
329326 private async Task LoadedAsync ( )
330327 {
328+ var cultures = LangSource . GetAvailableCultures ( ) . OrderBy ( x => x . Name ) ;
329+ Languages = new ( cultures ) ;
330+
331331 if ( Settings . Default . UpgradeRequired )
332332 {
333333 Settings . Default . Upgrade ( ) ;
You can’t perform that action at this time.
0 commit comments