diff --git a/CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml.cs b/CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml.cs index 13e5f8ef3..3a5254933 100644 --- a/CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml.cs +++ b/CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml.cs @@ -2436,6 +2436,10 @@ private async void ResetPlaytimeButton_Click(object sender, RoutedEventArgs e) private async void SyncDbPlaytimeButton_Click(object sender, RoutedEventArgs e) { + Button button = sender as Button; + if (sender != null) + button.IsEnabled = false; + try { SyncDbPlaytimeBtnGlyph.Glyph = "\uf110"; // Loading @@ -2459,6 +2463,11 @@ private async void SyncDbPlaytimeButton_Click(object sender, RoutedEventArgs e) SyncDbPlaytimeBtnGlyph.Glyph = "\uf021"; // Default SyncDbPlaytimeBtnText.Text = Lang._HomePage.GamePlaytime_Idle_SyncDb; } + finally + { + if (sender != null) + button.IsEnabled = true; + } } private void NumberValidationTextBox(TextBox sender, TextBoxBeforeTextChangingEventArgs args)