1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 15:57:24 +08:00

Remove duplicate try-catch and move NotifyShellUpdate() to less hidden place

This commit is contained in:
Susko3 2024-02-07 22:03:16 +01:00
parent f9d257b99e
commit 0563507295

View File

@ -68,6 +68,7 @@ namespace osu.Desktop.Windows
} }
updateDescriptions(localisation); updateDescriptions(localisation);
NotifyShellUpdate();
} }
catch (Exception e) catch (Exception e)
{ {
@ -76,8 +77,6 @@ namespace osu.Desktop.Windows
} }
private static void updateDescriptions(LocalisationManager? localisation) private static void updateDescriptions(LocalisationManager? localisation)
{
try
{ {
using var classes = Registry.CurrentUser.OpenSubKey(SOFTWARE_CLASSES, true); using var classes = Registry.CurrentUser.OpenSubKey(SOFTWARE_CLASSES, true);
if (classes == null) if (classes == null)
@ -89,13 +88,6 @@ namespace osu.Desktop.Windows
foreach (var association in uri_associations) foreach (var association in uri_associations)
association.UpdateDescription(classes, getLocalisedString(association.Description)); association.UpdateDescription(classes, getLocalisedString(association.Description));
NotifyShellUpdate();
}
catch (Exception e)
{
Logger.Log($@"Failed to update file and URI associations: {e.Message}");
}
string getLocalisedString(LocalisableString s) string getLocalisedString(LocalisableString s)
{ {
if (localisation == null) if (localisation == null)