misc: chore: Remove redundant code

This commit is contained in:
KeatonTheBot
2025-03-11 16:45:41 -05:00
parent 340ec79e9f
commit 05a88ccc94
109 changed files with 271 additions and 412 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ namespace Ryujinx.Ava.UI.Models
{
public class CheatNode : BaseModel
{
private bool _isEnabled = false;
private bool _isEnabled;
public ObservableCollection<CheatNode> SubNodes { get; } = [];
public string CleanName => Name.Length > 0 ? Name[1..^7] : Name;
public string BuildIdKey => $"{BuildId}-{Name}";
@@ -22,7 +22,7 @@ namespace Ryujinx.Ava.UI.ViewModels
private AvaloniaList<DownloadableContentModel> _downloadableContents = [];
private AvaloniaList<DownloadableContentModel> _selectedDownloadableContents = [];
private AvaloniaList<DownloadableContentModel> _views = [];
private bool _showBundledContentNotice = false;
private bool _showBundledContentNotice;
private string _search;
private readonly ApplicationData _applicationData;
@@ -6,7 +6,6 @@ using Avalonia.Media;
using Avalonia.Platform.Storage;
using Avalonia.Threading;
using DynamicData;
using DynamicData.Alias;
using DynamicData.Binding;
using FluentAvalonia.UI.Controls;
using Gommon;
@@ -466,7 +465,7 @@ namespace Ryujinx.Ava.UI.ViewModels
public bool OpenDeviceSaveDirectoryEnabled => !SelectedApplication.ControlHolder.ByteSpan.IsZeros() && SelectedApplication.ControlHolder.Value.DeviceSaveDataSize > 0;
public bool TrimXCIEnabled => Ryujinx.Common.Utilities.XCIFileTrimmer.CanTrim(SelectedApplication.Path, new Common.XCIFileTrimmerMainWindowLog(this));
public bool TrimXCIEnabled => XCIFileTrimmer.CanTrim(SelectedApplication.Path, new XCIFileTrimmerMainWindowLog(this));
public bool OpenBcatSaveDirectoryEnabled => !SelectedApplication.ControlHolder.ByteSpan.IsZeros() && SelectedApplication.ControlHolder.Value.BcatDeliveryCacheStorageSize > 0;
@@ -1542,7 +1541,7 @@ namespace Ryujinx.Ava.UI.ViewModels
Dispatcher.UIThread.InvokeAsync(() =>
{
Application.Current.Styles.TryGetResource(args.VSyncMode,
Avalonia.Application.Current.ActualThemeVariant,
Application.Current.ActualThemeVariant,
out object color);
if (color is not null)
@@ -2218,7 +2217,7 @@ namespace Ryujinx.Ava.UI.ViewModels
}
}
public async void ProcessTrimResult(String filename, Ryujinx.Common.Utilities.XCIFileTrimmer.OperationOutcome operationOutcome)
public async void ProcessTrimResult(String filename, XCIFileTrimmer.OperationOutcome operationOutcome)
{
string notifyUser = operationOutcome.ToLocalisedText();
@@ -2233,8 +2232,8 @@ namespace Ryujinx.Ava.UI.ViewModels
{
switch (operationOutcome)
{
case Ryujinx.Common.Utilities.XCIFileTrimmer.OperationOutcome.Successful:
if (Avalonia.Application.Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
case XCIFileTrimmer.OperationOutcome.Successful:
if (Application.Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
if (desktop.MainWindow is MainWindow mainWindow)
mainWindow.LoadApplications();
@@ -2251,7 +2250,7 @@ namespace Ryujinx.Ava.UI.ViewModels
return;
}
var trimmer = new XCIFileTrimmer(filename, new Common.XCIFileTrimmerMainWindowLog(this));
var trimmer = new XCIFileTrimmer(filename, new XCIFileTrimmerMainWindowLog(this));
if (trimmer.CanBeTrimmed)
{
@@ -25,7 +25,7 @@ namespace Ryujinx.Ava.UI.ViewModels
private AvaloniaList<TitleUpdateModel> _titleUpdates = [];
private AvaloniaList<object> _views = [];
private object _selectedUpdate = new TitleUpdateViewNoUpdateSentinal();
private bool _showBundledContentNotice = false;
private bool _showBundledContentNotice;
public AvaloniaList<TitleUpdateModel> TitleUpdates
{
@@ -6,7 +6,6 @@ using Ryujinx.HLE.FileSystem;
using Ryujinx.HLE.HOS;
using Ryujinx.UI.App.Common;
using Ryujinx.UI.Common.Configuration;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
+2 -2
View File
@@ -231,7 +231,7 @@ namespace Ryujinx.Ava.UI.Windows
ViewModel.ShowContent = true;
ViewModel.IsLoadingIndeterminate = false;
if (startFullscreen && ViewModel.WindowState != MainWindow.FullScreenWindowState)
if (startFullscreen && ViewModel.WindowState != FullScreenWindowState)
{
ViewModel.ToggleFullscreen();
}
@@ -243,7 +243,7 @@ namespace Ryujinx.Ava.UI.Windows
ViewModel.ShowLoadProgress = true;
ViewModel.IsLoadingIndeterminate = true;
if (startFullscreen && ViewModel.WindowState != MainWindow.FullScreenWindowState)
if (startFullscreen && ViewModel.WindowState != FullScreenWindowState)
{
ViewModel.ToggleFullscreen();
}