Skip to content

Fix: Fixed issue where it didn't work to change the library default directory #11349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Files.App/Filesystem/LibraryManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public async Task<LibraryLocationItem> UpdateLibrary(string libraryPath, string
{
library.Commit();
library.Reload(); // Reload folders list
ShellFolderExtensions.GetShellLibraryItem(library, libraryPath);
return Task.FromResult(ShellFolderExtensions.GetShellLibraryItem(library, libraryPath));
}
}
catch (Exception e)
Expand Down
2 changes: 1 addition & 1 deletion src/Files.App/Views/Pages/PropertiesLibrary.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<ColumnDefinition Width="36" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<FontIcon Glyph="&#xE008;" Visibility="{x:Bind IsDefault, Converter={StaticResource BoolToVisibilityConverter}}" />
<FontIcon Glyph="&#xE008;" Visibility="{x:Bind IsDefault, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}" />
<TextBlock
Grid.Column="2"
Margin="0,0,0,2"
Expand Down
10 changes: 8 additions & 2 deletions src/Files.App/Views/Pages/PropertiesLibrary.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Files.App.Filesystem;
using Files.App.Helpers;
Expand Down Expand Up @@ -239,10 +240,15 @@ public override void Dispose()
}

}
public class LibraryFolder
public class LibraryFolder : ObservableObject
{
public string Path { get; set; }

public bool IsDefault { get; set; }
private bool isDefault;
public bool IsDefault
{
get => isDefault;
set => SetProperty(ref isDefault, value);
}
}
}