gh-15494: Fixed library media tab freezing (gh-15495)

This commit is contained in:
mr. m
2026-09-21 01:43:48 +02:00
committed by GitHub
parent 303b6e39ed
commit b3467c0ff2
3 changed files with 7 additions and 3 deletions

View File

@@ -110,7 +110,7 @@
const targetRadius = window.matchMedia("(-moz-mac-tahoe-theme)")
.matches
? 11
: 10;
: 9;
document.documentElement.style.setProperty(
"--zen-border-radius",
targetRadius + "px"

View File

@@ -70,7 +70,11 @@ export function contentTypeOf(fileName) {
if (!extension) {
return "";
}
return lazy.mimeService.getTypeFromExtension(extension);
try {
return lazy.mimeService.getTypeFromExtension(extension);
} catch {
return "";
}
}
/**

View File

@@ -3314,7 +3314,7 @@ class nsZenWorkspaces {
parent.removeAttribute("icons-overflow");
return;
}
const maxButtonSize = 32; // IMPORTANT: This should match the CSS size of the icons
const maxButtonSize = AppConstants.platform == "macosx" ? 34 : 32; // IMPORTANT: This should match the CSS size of the icons
const minButtonSize = maxButtonSize / 2; // Minimum size for icons when space is limited
const separation = 3; // Space between icons