diff --git a/JL.Core/Dicts/DictUpdater.cs b/JL.Core/Dicts/DictUpdater.cs index 6aca0e4b..0ea8a0ca 100644 --- a/JL.Core/Dicts/DictUpdater.cs +++ b/JL.Core/Dicts/DictUpdater.cs @@ -71,7 +71,6 @@ internal static async Task DownloadDict(string dictPath, Uri dictDownloadU catch (Exception ex) { Utils.Frontend.ShowOkDialog($"Unexpected error while downloading {dictName}.", "Info"); - Utils.Logger.Error(ex, "Unexpected error while downloading {DictName}", dictName); } diff --git a/JL.Windows/GUI/MainWindow.xaml.cs b/JL.Windows/GUI/MainWindow.xaml.cs index 5a9dd075..b9fbd126 100644 --- a/JL.Windows/GUI/MainWindow.xaml.cs +++ b/JL.Windows/GUI/MainWindow.xaml.cs @@ -174,7 +174,7 @@ private bool CopyText(string text) { if (configManager.MergeSequentialTextsWhenTheyMatch) { - s_lastTextCopyTime = new(Stopwatch.GetTimestamp()); + s_lastTextCopyTime = new DateTime(Stopwatch.GetTimestamp()); } return false; diff --git a/JL.Windows/GUI/PreferencesWindow.xaml.cs b/JL.Windows/GUI/PreferencesWindow.xaml.cs index b3c02fba..db0fd328 100644 --- a/JL.Windows/GUI/PreferencesWindow.xaml.cs +++ b/JL.Windows/GUI/PreferencesWindow.xaml.cs @@ -644,14 +644,17 @@ private void ProfileComboBox_SelectionChanged(object sender, SelectionChangedEve ProfileDBUtils.UpdateCurrentProfile(connection); Stats.ProfileLifetimeStats = StatsDBUtils.GetStatsFromDB(connection, ProfileUtils.CurrentProfileId)!; StatsDBUtils.UpdateProfileLifetimeStats(connection); + } - ConfigManager configManager = ConfigManager.Instance; - Application.Current.Dispatcher.Invoke(() => + ConfigManager configManager = ConfigManager.Instance; + Application.Current.Dispatcher.Invoke(() => + { + using (SqliteConnection preferencesConnection = ConfigDBManager.CreateReadWriteDBConnection()) { - configManager.ApplyPreferences(connection); - configManager.LoadPreferenceWindow(this); - }); - } + configManager.ApplyPreferences(preferencesConnection); + } + configManager.LoadPreferenceWindow(this); + }); RegexReplacerUtils.PopulateRegexReplacements(); }