@@ -48,9 +48,7 @@ protected override void OnDataContextChanged(EventArgs e)
4848
4949 if ( ! MLManager . Init ( ) )
5050 {
51- InstallButton . IsEnabled = false ;
52- NightlyCheck . IsEnabled = false ;
53- VersionCombobox . IsEnabled = false ;
51+ Model . Offline = true ;
5452 ErrorBox . Open ( "Failed to fetch MelonLoader releases. Ensure you're online." ) ;
5553 }
5654 }
@@ -91,6 +89,8 @@ public void UpdateVersionInfo()
9189 if ( Model == null || VersionCombobox . SelectedItem == null )
9290 return ;
9391
92+ Model . Confirmation = false ;
93+
9494 MelonIcon . Opacity = Model . Game . MLInstalled ? 1 : 0.3 ;
9595
9696 if ( Model . Game . MLVersion == null )
@@ -99,7 +99,7 @@ public void UpdateVersionInfo()
9999 return ;
100100 }
101101
102- var comp = ( ( MLVersion ) VersionCombobox . SelectedItem ) . Version . ComparePrecedenceTo ( Model . Game . MLVersion ) ;
102+ var comp = ( ( MLVersion ) VersionCombobox . SelectedItem ) . Version . CompareSortOrderTo ( Model . Game . MLVersion ) ;
103103
104104 InstallButton . Content = comp switch
105105 {
@@ -118,8 +118,6 @@ private void InstallHandler(object sender, RoutedEventArgs args)
118118 }
119119
120120 Model . Installing = true ;
121- NightlyCheck . IsEnabled = false ;
122- VersionCombobox . IsEnabled = false ;
123121
124122 _ = MLManager . InstallAsync ( Path . GetDirectoryName ( Model . Game . Path ) ! , Model . Game . MLInstalled && ! KeepFilesCheck . IsChecked ! . Value ,
125123 ( MLVersion ) VersionCombobox . SelectedItem ! , Model . Game . Is32Bit ,
@@ -141,16 +139,18 @@ private void OnInstallFinished(string? errorMessage)
141139 if ( Model == null )
142140 return ;
143141
144- Model . Installing = false ;
145- NightlyCheck . IsEnabled = true ;
146- VersionCombobox . IsEnabled = true ;
147-
148142 Model . Game . ValidateGame ( ) ;
149143
144+ Model . Installing = false ;
145+
150146 if ( errorMessage != null )
151147 {
152148 ErrorBox . Open ( errorMessage ) ;
149+ return ;
153150 }
151+
152+ InstallStatus . Text = "Done!" ;
153+ Model . Confirmation = true ;
154154 }
155155
156156 private void OpenDirHandler ( object sender , RoutedEventArgs args )
@@ -205,8 +205,6 @@ private async void SelectZipHandler(object sender, TappedEventArgs args)
205205 var path = files [ 0 ] . Path . LocalPath ;
206206
207207 Model . Installing = true ;
208- NightlyCheck . IsEnabled = false ;
209- VersionCombobox . IsEnabled = false ;
210208
211209 _ = Task . Run ( ( ) => MLManager . SetLocalZip ( path ,
212210 ( progress , newStatus ) => Dispatcher . UIThread . Post ( ( ) => OnInstallProgress ( progress , newStatus ) ) ,
0 commit comments