Compare commits

...

3 Commits

Author SHA1 Message Date
Evan Husted
c3831428e0 Try and fix weird nullref 2024-11-19 10:22:11 -06:00
Evan Husted
fda79efed4 Fix Windows builds not being uploaded 2024-11-19 09:31:22 -06:00
Nicola
8444e4dca0 Fixed mime types button not updating after install/uninstall (#241) 2024-11-19 02:16:15 -06:00
4 changed files with 17 additions and 9 deletions

View File

@@ -174,7 +174,7 @@ jobs:
uses: ncipollo/release-action@v1
with:
name: ${{ steps.version_info.outputs.build_version }}
artifacts: "release_output/*.tar.gz,release_output/*.zip/*AppImage*"
artifacts: "release_output/*.tar.gz,release_output/*.zip,release_output/*AppImage*"
tag: ${{ steps.version_info.outputs.build_version }}
body: "**Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ steps.version_info.outputs.prev_build_version }}...${{ steps.version_info.outputs.build_version }}"
omitBodyDuringUpdate: true

View File

@@ -101,13 +101,13 @@ namespace Ryujinx.UI.Common.Helper
{
RegistryKey key = Registry.CurrentUser.OpenSubKey(@$"Software\Classes\{ext}");
if (key is null)
var openCmd = key?.OpenSubKey(@"shell\open\command");
if (openCmd is null)
{
return false;
}
var openCmd = key.OpenSubKey(@"shell\open\command");
string keyValue = (string)openCmd.GetValue(string.Empty);
return keyValue is not null && (keyValue.Contains("Ryujinx") || keyValue.Contains(AppDomain.CurrentDomain.FriendlyName));

View File

@@ -102,6 +102,7 @@ namespace Ryujinx.Ava.UI.ViewModels
private float _volumeBeforeMute;
private string _backendText;
private bool _areMimeTypesRegistered = FileAssociationHelper.AreMimeTypesRegistered;
private bool _canUpdate = true;
private Cursor _cursor;
private string _title;
@@ -804,10 +805,15 @@ namespace Ryujinx.Ava.UI.ViewModels
{
get => FileAssociationHelper.IsTypeAssociationSupported;
}
public bool AreMimeTypesRegistered
{
get => FileAssociationHelper.AreMimeTypesRegistered;
get => _areMimeTypesRegistered;
set {
_areMimeTypesRegistered = value;
OnPropertyChanged();
}
}
public ObservableCollectionExtended<ApplicationData> Applications

View File

@@ -165,7 +165,8 @@ namespace Ryujinx.Ava.UI.Views.Main
private async void InstallFileTypes_Click(object sender, RoutedEventArgs e)
{
if (FileAssociationHelper.Install())
ViewModel.AreMimeTypesRegistered = FileAssociationHelper.Install();
if (ViewModel.AreMimeTypesRegistered)
await ContentDialogHelper.CreateInfoDialog(LocaleManager.Instance[LocaleKeys.DialogInstallFileTypesSuccessMessage], string.Empty, LocaleManager.Instance[LocaleKeys.InputDialogOk], string.Empty, string.Empty);
else
await ContentDialogHelper.CreateErrorDialog(LocaleManager.Instance[LocaleKeys.DialogInstallFileTypesErrorMessage]);
@@ -173,7 +174,8 @@ namespace Ryujinx.Ava.UI.Views.Main
private async void UninstallFileTypes_Click(object sender, RoutedEventArgs e)
{
if (FileAssociationHelper.Uninstall())
ViewModel.AreMimeTypesRegistered = !FileAssociationHelper.Uninstall();
if (!ViewModel.AreMimeTypesRegistered)
await ContentDialogHelper.CreateInfoDialog(LocaleManager.Instance[LocaleKeys.DialogUninstallFileTypesSuccessMessage], string.Empty, LocaleManager.Instance[LocaleKeys.InputDialogOk], string.Empty, string.Empty);
else
await ContentDialogHelper.CreateErrorDialog(LocaleManager.Instance[LocaleKeys.DialogUninstallFileTypesErrorMessage]);