Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public ImagePreviewViewModel(ListedItem item)

// TODO: Use existing helper mothods
public static bool ContainsExtension(string extension)
=> extension is ".png" or ".jpg" or ".jpeg" or ".bmp" or ".gif" or ".tiff" or ".ico" or ".webp";
=> extension is ".png" or ".jpg" or ".jpeg" or ".bmp" or ".gif" or ".tiff" or ".ico" or ".webp" or ".jxr";

public override async Task<List<FileProperty>> LoadPreviewAndDetailsAsync()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Files.Shared/Helpers/FileExtensionHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static bool HasExtension(string? filePathToCheck, params string[] extensi
/// <returns><c>true</c> if the fileExtensionToCheck is an image; otherwise, <c>false</c>.</returns>
public static bool IsImageFile(string? fileExtensionToCheck)
{
return HasExtension(fileExtensionToCheck, ".png", ".bmp", ".jpg", ".jpeg", ".jfif", ".gif", ".tiff", ".tif", ".webp");
return HasExtension(fileExtensionToCheck, ".png", ".bmp", ".jpg", ".jpeg", ".jfif", ".gif", ".tiff", ".tif", ".webp", ".jxr");
}

/// <summary>
Expand All @@ -42,7 +42,7 @@ public static bool IsImageFile(string? fileExtensionToCheck)
/// <returns><c>true</c> if the fileExtensionToCheck is an image; otherwise, <c>false</c>.</returns>
public static bool IsCompatibleToSetAsWindowsWallpaper(string? fileExtensionToCheck)
{
return HasExtension(fileExtensionToCheck, ".png", ".bmp", ".jpg", ".jpeg", ".jfif", ".gif", ".tiff", ".tif");
return HasExtension(fileExtensionToCheck, ".png", ".bmp", ".jpg", ".jpeg", ".jfif", ".gif", ".tiff", ".tif", ".jxr");
}

/// <summary>
Expand Down