Skip to content

Commit b0e3167

Browse files
committed
Fixed family name
1 parent ad1c44f commit b0e3167

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

src/Files/ViewModels/SettingsViewModels/ExperimentalViewModel.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public ExperimentalViewModel()
2828
{
2929
IsSetAsDefaultFileManager = DetectIsSetAsDefaultFileManager();
3030
IsSetAsOpenFileDialog = DetectIsSetAsOpenFileDialog();
31-
IsSideloadVersion = DetectIsSideloadVersion();
31+
IsSetAsDefaultVisible = DetectIsSetAsDefaultVisible();
3232

3333
EditFileTagsCommand = new AsyncRelayCommand(LaunchFileTagsConfigFile);
3434
SetAsDefaultExplorerCommand = new AsyncRelayCommand(SetAsDefaultExplorer);
@@ -130,9 +130,9 @@ private bool DetectIsSetAsOpenFileDialog()
130130
return ApplicationData.Current.LocalSettings.Values.Get("IsSetAsOpenFileDialog", false);
131131
}
132132

133-
private bool DetectIsSideloadVersion()
133+
private bool DetectIsSetAsDefaultVisible()
134134
{
135-
if (Package.Current.Id.FamilyName == "49306atecsolution.FilesUWP_dwm5abbcs5pn0")
135+
if (Package.Current.Id.FamilyName == "FilesUWP_dwm5abbcs5pn0" && !IsSetAsDefaultFileManager)
136136
{
137137
return false;
138138
}
@@ -154,13 +154,14 @@ public bool IsSetAsOpenFileDialog
154154
get => isSetAsOpenFileDialog;
155155
set => SetProperty(ref isSetAsOpenFileDialog, value);
156156
}
157-
158-
private bool isSideloadVersion;
159157

160-
public bool IsSideloadVersion
158+
159+
private bool isSetAsDefaultVisible;
160+
161+
public bool IsSetAsDefaultVisible
161162
{
162-
get => isSideloadVersion;
163-
set => SetProperty(ref isSideloadVersion, value);
163+
get => isSetAsDefaultVisible;
164+
set => SetProperty(ref isSetAsDefaultVisible, value);
164165
}
165166
}
166167
}

src/Files/Views/SettingsPages/Experimental.xaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
xmlns:local="using:Files.UserControls.Settings"
1010
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
1111
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
12-
xmlns:settingsviewmodels="using:Files.ViewModels.SettingsViewModels" xmlns:converters="using:Files.Converters"
12+
xmlns:settingsviewmodels="using:Files.ViewModels.SettingsViewModels"
1313
mc:Ignorable="d">
1414
<Page.Resources>
1515
<ResourceDictionary Source="/ResourceDictionaries/RightAlignedToggleSwitchStyle.xaml" />
@@ -93,11 +93,12 @@
9393
Text="{helpers:ResourceString Name=SettingsDefaultFilesManager}" />
9494

9595
<local:SettingsBlockControl
96+
x:Name="SetAsDefaultSettingsBlockControl"
9697
Title="{helpers:ResourceString Name=SettingsSetAsDefaultFileManager}"
9798
HorizontalAlignment="Stretch"
9899
Description="{helpers:ResourceString Name=SettingsSetAsDefaultFileManagerDescription}"
99100
IsExpanded="True"
100-
x:Load="{Binding converters:MultiBooleanConverter.OrConvertToVisibility(IsSetAsDefaultFileManager, IsSideloadVersion), Mode=OneWay}">
101+
Visibility="{Binding IsSetAsDefaultVisible, Mode=OneWay}">
101102
<local:SettingsBlockControl.Icon>
102103
<FontIcon Glyph="&#xEC50;" />
103104
</local:SettingsBlockControl.Icon>

0 commit comments

Comments
 (0)