Revert "misc: chore: Remove redundant code"

This reverts commit 05a88ccc94.
This commit is contained in:
KeatonTheBot
2025-03-15 20:00:22 -05:00
parent 7960ea643f
commit efd5a104b6
109 changed files with 412 additions and 271 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ namespace Ryujinx.Ava.UI.Models
{
public class CheatNode : BaseModel
{
private bool _isEnabled;
private bool _isEnabled = false;
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;
private bool _showBundledContentNotice = false;
private string _search;
private readonly ApplicationData _applicationData;
@@ -6,6 +6,7 @@ using Avalonia.Media;
using Avalonia.Platform.Storage;
using Avalonia.Threading;
using DynamicData;
using DynamicData.Alias;
using DynamicData.Binding;
using FluentAvalonia.UI.Controls;
using Gommon;
@@ -465,7 +466,7 @@ namespace Ryujinx.Ava.UI.ViewModels
public bool OpenDeviceSaveDirectoryEnabled => !SelectedApplication.ControlHolder.ByteSpan.IsZeros() && SelectedApplication.ControlHolder.Value.DeviceSaveDataSize > 0;
public bool TrimXCIEnabled => XCIFileTrimmer.CanTrim(SelectedApplication.Path, new XCIFileTrimmerMainWindowLog(this));
public bool TrimXCIEnabled => Ryujinx.Common.Utilities.XCIFileTrimmer.CanTrim(SelectedApplication.Path, new Common.XCIFileTrimmerMainWindowLog(this));
public bool OpenBcatSaveDirectoryEnabled => !SelectedApplication.ControlHolder.ByteSpan.IsZeros() && SelectedApplication.ControlHolder.Value.BcatDeliveryCacheStorageSize > 0;
@@ -1541,7 +1542,7 @@ namespace Ryujinx.Ava.UI.ViewModels
Dispatcher.UIThread.InvokeAsync(() =>
{
Application.Current.Styles.TryGetResource(args.VSyncMode,
Application.Current.ActualThemeVariant,
Avalonia.Application.Current.ActualThemeVariant,
out object color);
if (color is not null)
@@ -2217,7 +2218,7 @@ namespace Ryujinx.Ava.UI.ViewModels
}
}
public async void ProcessTrimResult(String filename, XCIFileTrimmer.OperationOutcome operationOutcome)
public async void ProcessTrimResult(String filename, Ryujinx.Common.Utilities.XCIFileTrimmer.OperationOutcome operationOutcome)
{
string notifyUser = operationOutcome.ToLocalisedText();
@@ -2232,8 +2233,8 @@ namespace Ryujinx.Ava.UI.ViewModels
{
switch (operationOutcome)
{
case XCIFileTrimmer.OperationOutcome.Successful:
if (Application.Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
case Ryujinx.Common.Utilities.XCIFileTrimmer.OperationOutcome.Successful:
if (Avalonia.Application.Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
if (desktop.MainWindow is MainWindow mainWindow)
mainWindow.LoadApplications();
@@ -2250,7 +2251,7 @@ namespace Ryujinx.Ava.UI.ViewModels
return;
}
var trimmer = new XCIFileTrimmer(filename, new XCIFileTrimmerMainWindowLog(this));
var trimmer = new XCIFileTrimmer(filename, new Common.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;
private bool _showBundledContentNotice = false;
public AvaloniaList<TitleUpdateModel> TitleUpdates
{
@@ -6,6 +6,7 @@ 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 != FullScreenWindowState)
if (startFullscreen && ViewModel.WindowState != MainWindow.FullScreenWindowState)
{
ViewModel.ToggleFullscreen();
}
@@ -243,7 +243,7 @@ namespace Ryujinx.Ava.UI.Windows
ViewModel.ShowLoadProgress = true;
ViewModel.IsLoadingIndeterminate = true;
if (startFullscreen && ViewModel.WindowState != FullScreenWindowState)
if (startFullscreen && ViewModel.WindowState != MainWindow.FullScreenWindowState)
{
ViewModel.ToggleFullscreen();
}