mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-09 12:19:12 +00:00
Disable back button when not in a folder, hide filesize/time played info for folders
This commit is contained in:
parent
5197e73499
commit
8a610aafd7
4 changed files with 19 additions and 1 deletions
|
@ -36,6 +36,8 @@ namespace Ryujinx.UI.App.Common
|
|||
|
||||
public string FileSizeString => ValueFormatUtils.FormatFileSize(FileSize);
|
||||
|
||||
public bool IsGame => FileExtension != "Folder";
|
||||
|
||||
public static string GetApplicationBuildId(VirtualFileSystem virtualFileSystem, string titleFilePath)
|
||||
{
|
||||
using FileStream file = new(titleFilePath, FileMode.Open, FileAccess.Read);
|
||||
|
|
|
@ -123,6 +123,7 @@
|
|||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Orientation="Vertical"
|
||||
IsVisible="{Binding IsGame}"
|
||||
Spacing="5">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Stretch"
|
||||
|
|
|
@ -85,6 +85,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
private bool _showAll;
|
||||
private string _lastScannedAmiiboId;
|
||||
private bool _statusBarVisible;
|
||||
private bool _isInFolder;
|
||||
private ReadOnlyObservableCollection<ApplicationData> _appsObservableList;
|
||||
|
||||
private string _showUiKey = "F4";
|
||||
|
@ -670,6 +671,16 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
|
||||
public bool IsGrid => Glyph == Glyph.Grid;
|
||||
public bool IsList => Glyph == Glyph.List;
|
||||
public bool IsInFolder
|
||||
{
|
||||
get => _isInFolder;
|
||||
set
|
||||
{
|
||||
_isInFolder = value;
|
||||
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
internal void Sort(bool isAscending)
|
||||
{
|
||||
|
@ -1286,6 +1297,8 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
public void OpenFolder(string path)
|
||||
{
|
||||
_pathHistory.Enqueue(path);
|
||||
IsInFolder = _pathHistory.Count != 0;
|
||||
|
||||
Applications.Clear();
|
||||
List<string> SearchPaths = new List<string>();
|
||||
SearchPaths.Add(path);
|
||||
|
@ -1309,6 +1322,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
ApplicationLibrary.LoadApplications(SearchPaths, ConfigurationState.Instance.System.Language);
|
||||
}
|
||||
}
|
||||
IsInFolder = _pathHistory.Count != 0;
|
||||
}
|
||||
|
||||
public void SetListMode()
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
MinWidth="80"
|
||||
Margin="5,2,0,2"
|
||||
VerticalAlignment="Stretch"
|
||||
Command="{Binding NavigateBack}">
|
||||
Command="{Binding NavigateBack}"
|
||||
IsEnabled="{Binding IsInFolder}">
|
||||
<ui:FontIcon
|
||||
Margin="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
|
|
Loading…
Reference in a new issue