mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-26 18:43:04 +00:00
Remove ApplicationAdded event; always enumerate nsp when autoloading
This commit is contained in:
parent
13bac28e43
commit
aa26421310
2 changed files with 3 additions and 35 deletions
|
@ -1,9 +0,0 @@
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace Ryujinx.UI.App.Common
|
|
||||||
{
|
|
||||||
public class ApplicationAddedEventArgs : EventArgs
|
|
||||||
{
|
|
||||||
public ApplicationData AppData { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -41,7 +41,6 @@ namespace Ryujinx.UI.App.Common
|
||||||
public class ApplicationLibrary
|
public class ApplicationLibrary
|
||||||
{
|
{
|
||||||
public Language DesiredLanguage { get; set; }
|
public Language DesiredLanguage { get; set; }
|
||||||
public event EventHandler<ApplicationAddedEventArgs> ApplicationAdded;
|
|
||||||
public event EventHandler<ApplicationCountUpdatedEventArgs> ApplicationCountUpdated;
|
public event EventHandler<ApplicationCountUpdatedEventArgs> ApplicationCountUpdated;
|
||||||
|
|
||||||
public readonly IObservableCache<ApplicationData, ulong> Applications;
|
public readonly IObservableCache<ApplicationData, ulong> Applications;
|
||||||
|
@ -629,6 +628,7 @@ namespace Ryujinx.UI.App.Common
|
||||||
{
|
{
|
||||||
Logger.Warning?.Print(LogClass.Application, $"The file encountered was not of a valid type. File: '{filePath}' Error: {exception}");
|
Logger.Warning?.Print(LogClass.Application, $"The file encountered was not of a valid type. File: '{filePath}' Error: {exception}");
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -729,14 +729,6 @@ namespace Ryujinx.UI.App.Common
|
||||||
|
|
||||||
if (TryGetApplicationsFromFile(applicationPath, out List<ApplicationData> applications))
|
if (TryGetApplicationsFromFile(applicationPath, out List<ApplicationData> applications))
|
||||||
{
|
{
|
||||||
foreach (var application in applications)
|
|
||||||
{
|
|
||||||
OnApplicationAdded(new ApplicationAddedEventArgs
|
|
||||||
{
|
|
||||||
AppData = application,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
_applications.Edit(it =>
|
_applications.Edit(it =>
|
||||||
{
|
{
|
||||||
foreach (var application in applications)
|
foreach (var application in applications)
|
||||||
|
@ -839,12 +831,7 @@ namespace Ryujinx.UI.App.Common
|
||||||
};
|
};
|
||||||
|
|
||||||
IEnumerable<string> files = Directory.EnumerateFiles(appDir, "*", options).Where(
|
IEnumerable<string> files = Directory.EnumerateFiles(appDir, "*", options).Where(
|
||||||
file =>
|
file => Path.GetExtension(file).ToLower() is ".nsp");
|
||||||
{
|
|
||||||
return
|
|
||||||
(Path.GetExtension(file).ToLower() is ".nsp" &&
|
|
||||||
ConfigurationState.Instance.UI.ShownFileTypes.NSP.Value);
|
|
||||||
});
|
|
||||||
|
|
||||||
foreach (string app in files)
|
foreach (string app in files)
|
||||||
{
|
{
|
||||||
|
@ -940,12 +927,7 @@ namespace Ryujinx.UI.App.Common
|
||||||
};
|
};
|
||||||
|
|
||||||
IEnumerable<string> files = Directory.EnumerateFiles(appDir, "*", options).Where(
|
IEnumerable<string> files = Directory.EnumerateFiles(appDir, "*", options).Where(
|
||||||
file =>
|
file => Path.GetExtension(file).ToLower() is ".nsp");
|
||||||
{
|
|
||||||
return
|
|
||||||
(Path.GetExtension(file).ToLower() is ".nsp" &&
|
|
||||||
ConfigurationState.Instance.UI.ShownFileTypes.NSP.Value);
|
|
||||||
});
|
|
||||||
|
|
||||||
foreach (string app in files)
|
foreach (string app in files)
|
||||||
{
|
{
|
||||||
|
@ -1018,11 +1000,6 @@ namespace Ryujinx.UI.App.Common
|
||||||
return numUpdatesLoaded;
|
return numUpdatesLoaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void OnApplicationAdded(ApplicationAddedEventArgs e)
|
|
||||||
{
|
|
||||||
ApplicationAdded?.Invoke(null, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void OnApplicationCountUpdated(ApplicationCountUpdatedEventArgs e)
|
protected void OnApplicationCountUpdated(ApplicationCountUpdatedEventArgs e)
|
||||||
{
|
{
|
||||||
ApplicationCountUpdated?.Invoke(null, e);
|
ApplicationCountUpdated?.Invoke(null, e);
|
||||||
|
|
Loading…
Reference in a new issue