Skip to content
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: Another fix for thumbnails #14936

Closed
wants to merge 1 commit into from
Closed

Fix: Another fix for thumbnails #14936

wants to merge 1 commit into from

Conversation

yaira2
Copy link
Member

@yaira2 yaira2 commented Mar 10, 2024

Resolved / Related Issues

  • Were these changes approved in an issue or discussion with the project maintainers? In order to prevent extra work, feature requests and changes to the codebase must be approved before the pull request will be reviewed. This prevents extra work for the contributors and maintainers.
    Closes Bug: Icons take a while to display under heavy load #14817...

Validation
How did you test these changes?

  • Did you build the app and test your changes?
  • Did you check for accessibility? You can use Accessibility Insights for this.
  • Did you remove any strings from the en-us resource file?
    • Did you search the solution to see if the string is still being used?
  • Did you implement any design changes to an existing feature?
    • Was this change approved?
  • Are there any other steps that were used to validate these changes?
    1. Open app ...
    2. Click settings button ...

Screenshots (optional)
Add screenshots here.

@@ -1032,6 +1032,11 @@ public async Task LoadExtendedItemPropertiesAsync(ListedItem item)
BaseStorageFolder matchingStorageFolder = await GetFolderFromPathAsync(item.ItemPath, cts.Token);
if (matchingStorageFolder is not null)
{
cts.Token.ThrowIfCancellationRequested();
await LoadThumbnailAsync(item);
Copy link
Member Author

@yaira2 yaira2 Mar 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is resolved when we request the thumbnail after executing GetFolderFromPathAsync. However, this causes a new issue where excessive scrolling crashes the app.

Comment on lines +1036 to +1038
await LoadThumbnailAsync(item);

cts.Token.ThrowIfCancellationRequested();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
await LoadThumbnailAsync(item);
cts.Token.ThrowIfCancellationRequested();
_ = LoadThumbnailAsync(item);

This seems to avoid crashes, but is that still going to solve the issue?

@@ -1097,16 +1102,15 @@ public async Task LoadExtendedItemPropertiesAsync(ListedItem item)
SetFileTag(item);
});
}
else
else if (UserSettingsService.FoldersSettingsService.ShowThumbnails && item.SyncStatusUI.SyncStatus != CloudDriveSyncStatus.NotSynced && item.SyncStatusUI.SyncStatus != CloudDriveSyncStatus.Unknown)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
else if (UserSettingsService.FoldersSettingsService.ShowThumbnails && item.SyncStatusUI.SyncStatus != CloudDriveSyncStatus.NotSynced && item.SyncStatusUI.SyncStatus != CloudDriveSyncStatus.Unknown)
else if (item.SyncStatusUI.SyncStatus != CloudDriveSyncStatus.NotSynced && item.SyncStatusUI.SyncStatus != CloudDriveSyncStatus.Unknown)

@yaira2 yaira2 closed this Mar 11, 2024
@yaira2 yaira2 deleted the ya/YetAnotherAttempt branch April 15, 2024 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Icons take a while to display under heavy load
2 participants