Skip to content

Commit

Permalink
Enable only on dev build
Browse files Browse the repository at this point in the history
  • Loading branch information
gave92 committed Apr 16, 2024
1 parent 8ff5106 commit d89ea51
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/Files.App/ViewModels/Settings/AdvancedViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,11 @@ public bool IsSetAsOpenFileDialog
set => SetProperty(ref isSetAsOpenFileDialog, value);
}

public bool CanShowSetAsOpenFileDialog
{
get => AppLifecycleHelper.AppEnvironment is AppEnvironment.Dev;
}

private FileSavePicker InitializeWithWindow(FileSavePicker obj)
{
WinRT.Interop.InitializeWithWindow.Initialize(obj, MainWindow.Instance.WindowHandle);
Expand Down
3 changes: 2 additions & 1 deletion src/Files.App/Views/Settings/AdvancedPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@
<local:SettingsBlockControl
x:Name="ReplaceOpenFileDialogSetting"
Title="{helpers:ResourceString Name=SettingsSetAsOpenDialog}"
HorizontalAlignment="Stretch">
HorizontalAlignment="Stretch"
x:Load="{x:Bind ViewModel.CanShowSetAsOpenFileDialog}">
<local:SettingsBlockControl.Icon>
<FontIcon Glyph="&#xE8E5;" />
</local:SettingsBlockControl.Icon>
Expand Down

0 comments on commit d89ea51

Please sign in to comment.