-
-
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
Fix: Fixed thumbails not loading in MTP devices #16782
base: main
Are you sure you want to change the base?
Conversation
I was thinking we could take this a step forward with a single method in |
/// <summary> | ||
/// Returns thumbnail for given file or folder using Storage API | ||
/// </summary> | ||
public static async Task<byte[]?> GetIconAsync(IStorageItem item, uint requestedSize, ThumbnailMode thumbnailMode, ThumbnailOptions thumbnailOptions) |
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.
Is thumbnail mode always single?
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.
Both ListView and SingleItem are used
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.
I think we can reduce complexity by just using SingleItem.
Ok now thumbnails work in file list, in properties window and preview pane 💪 |
@@ -86,6 +86,7 @@ public async virtual Task<List<FileProperty>> LoadPreviewAndDetailsAsync() | |||
{ | |||
var result = await FileThumbnailHelper.GetIconAsync( | |||
Item.ItemPath, | |||
Item.ItemFile, |
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.
If we're anyways passing StorageItem, is there any reason to continue passing the path?
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.Added back some code removed in #14423 which is necessary for loading thumbails in MTP.
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.