-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Feature: Display storage information for phones and tablets #16695
Feature: Display storage information for phones and tablets #16695
Conversation
var propertiesSource = Root; | ||
if (string.IsNullOrEmpty(Root.Path) && | ||
Path.StartsWith(@"\\?\", StringComparison.Ordinal) && | ||
(await Root.GetFoldersAsync())[0] is StorageFolder systemFolder) | ||
{ | ||
propertiesSource = systemFolder; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var propertiesSource = Root; | |
if (string.IsNullOrEmpty(Root.Path) && | |
Path.StartsWith(@"\\?\", StringComparison.Ordinal) && | |
(await Root.GetFoldersAsync())[0] is StorageFolder systemFolder) | |
{ | |
propertiesSource = systemFolder; | |
} | |
var propertiesSource = (string.IsNullOrEmpty(Root.Path) && | |
Path.StartsWith(@"\\?\", StringComparison.Ordinal) && | |
(await Root.GetFoldersAsync())[0] is StorageFolder systemFolder) | |
? systemFolder | |
: Root; |
This appears to be an issue because the widget only displays storage information for the device, and not the SD card. Instead of showing this info on the drives widget, it might be better to display it within the folder view when you open the device in Files, just like File Explorer. |
I'm not sure on how to proceed for implementation:
The issue is that it is a common folder, how should we display storage infos? |
The details layout should be the easiest to update. We can add some additional columns and make them visible by default when opening the right type of drive. Regarding the implementation, is there a way to determine when to load the details? |
At the moment we're just checking whether the drive path starts with Edit. Just found we may use |
Using the foundation added in #16717, we should be able to display the storage information for the contextual property. |
@ferrariofilippo thank you for this PR. Building on this foundation and the work in #16717, I've opened #16729. |
Resolved / Related Issues
To prevent extra work, all changes to the Files codebase must link to an approved issue marked as
Ready to build
. Please insert the issue number following the hashtag with the issue number that this Pull Request resolves.Notes
I proposed two possible working solutions (one commented out):
Tell me which one do you find more appropriate
Screenshots
Steps used to test these changes
Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.
Files
HomeDrives
widget