Skip to content

Commit f8fb70d

Browse files
author
Yair Aichenbaum
committed
Moved more settings to the new format
1 parent 2e0707f commit f8fb70d

File tree

2 files changed

+27
-27
lines changed

2 files changed

+27
-27
lines changed

Files/View Models/SettingsViewModel.cs

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,23 @@ private async void DetectCustomLocations()
273273
}
274274
}
275275

276+
private TimeStyle _DisplayedTimeStyle = TimeStyle.Application;
277+
public TimeStyle DisplayedTimeStyle
278+
{
279+
get => _DisplayedTimeStyle;
280+
set
281+
{
282+
Set(ref _DisplayedTimeStyle, value);
283+
if (value.Equals(TimeStyle.Application))
284+
{
285+
localSettings.Values[LocalSettings.DateTimeFormat] = "Application";
286+
}
287+
else if (value.Equals(TimeStyle.System))
288+
{
289+
localSettings.Values[LocalSettings.DateTimeFormat] = "System";
290+
}
291+
}
292+
}
276293
private void DetectApplicationTheme()
277294
{
278295
if (localSettings.Values["theme"] != null)
@@ -365,13 +382,6 @@ public ThemeStyle ThemeValue
365382
}
366383
}
367384

368-
private bool _AreLinuxFilesSupported = false;
369-
public bool AreLinuxFilesSupported
370-
{
371-
get => _AreLinuxFilesSupported;
372-
set => Set(ref _AreLinuxFilesSupported, value);
373-
}
374-
375385
private void DetectOneDrivePreference()
376386
{
377387
if (localSettings.Values["PinOneDrive"] == null) { localSettings.Values["PinOneDrive"] = true; }
@@ -534,6 +544,12 @@ public bool ShowRibbonContent
534544
set => Set(value);
535545
}
536546

547+
public bool AreLinuxFilesSupported
548+
{
549+
get => Get(false);
550+
set => Set(value);
551+
}
552+
537553
public Int32 LayoutMode
538554
{
539555
get => Get(0); // List View
@@ -563,24 +579,6 @@ public string ToggleLayoutModeIcon
563579
}
564580
});
565581

566-
private TimeStyle _DisplayedTimeStyle = TimeStyle.Application;
567-
public TimeStyle DisplayedTimeStyle
568-
{
569-
get => _DisplayedTimeStyle;
570-
set
571-
{
572-
Set(ref _DisplayedTimeStyle, value);
573-
if (value.Equals(TimeStyle.Application))
574-
{
575-
localSettings.Values[LocalSettings.DateTimeFormat] = "Application";
576-
}
577-
else if (value.Equals(TimeStyle.System))
578-
{
579-
localSettings.Values[LocalSettings.DateTimeFormat] = "System";
580-
}
581-
}
582-
}
583-
584582
[Obsolete]
585583
public static ObservableCollection<DriveItem> foundDrives = new ObservableCollection<DriveItem>();
586584

Files/Views/SettingsPages/Appearance.xaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6-
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="using:Files"
6+
xmlns:local="using:Files"
7+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
78
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
89
mc:Ignorable="d">
910

@@ -99,9 +100,10 @@
99100

100101
<ToggleSwitch
101102
x:Name="AcrylicSidebarSwitch"
102-
Grid.Column="2" IsOn="{x:Bind local:App.AppSettings.AcrylicSidebar, Mode=TwoWay}"
103+
Grid.Column="2"
103104
Width="40"
104105
HorizontalAlignment="Right"
106+
IsOn="{x:Bind local:App.AppSettings.AcrylicSidebar, Mode=TwoWay}"
105107
OffContent=""
106108
OnContent="" />
107109
</Grid>

0 commit comments

Comments
 (0)