mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update image loading
This commit is contained in:
parent
22a0210633
commit
3685bd3766
3 changed files with 9 additions and 12 deletions
|
@ -94,10 +94,11 @@ define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events'], functio
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var filledImages = [];
|
||||||
var cancellationTokens = [];
|
var cancellationTokens = [];
|
||||||
|
|
||||||
function unveilInternal(tokenIndex) {
|
function unveilInternal(tokenIndex) {
|
||||||
|
|
||||||
var remaining = [];
|
|
||||||
var anyFound = false;
|
var anyFound = false;
|
||||||
var out = false;
|
var out = false;
|
||||||
|
|
||||||
|
@ -108,25 +109,22 @@ define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events'], functio
|
||||||
if (cancellationTokens[tokenIndex]) {
|
if (cancellationTokens[tokenIndex]) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (filledImages[i]) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
var img = images[i];
|
var img = images[i];
|
||||||
if (!out && isVisible(img)) {
|
if (!out && isVisible(img)) {
|
||||||
anyFound = true;
|
anyFound = true;
|
||||||
|
filledImages[i] = true;
|
||||||
fillImage(img);
|
fillImage(img);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (anyFound) {
|
if (anyFound) {
|
||||||
out = true;
|
out = true;
|
||||||
}
|
}
|
||||||
remaining.push(img);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (out) {
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
images = remaining;
|
|
||||||
|
|
||||||
if (!images.length) {
|
if (!images.length) {
|
||||||
document.removeEventListener('focus', unveil, true);
|
document.removeEventListener('focus', unveil, true);
|
||||||
document.removeEventListener('scroll', unveil, true);
|
document.removeEventListener('scroll', unveil, true);
|
||||||
|
|
|
@ -1562,7 +1562,7 @@ emby-collapsible > .style-scope {
|
||||||
|
|
||||||
.ui-body-b .emby-collapsible-button {
|
.ui-body-b .emby-collapsible-button {
|
||||||
border: 1px solid #222;
|
border: 1px solid #222;
|
||||||
background-color: #383838;
|
background-color: #333;
|
||||||
text-transform: none;
|
text-transform: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1574,8 +1574,7 @@ emby-collapsible > .style-scope {
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-body-b .emby-collapsible-content {
|
.ui-body-b .emby-collapsible-content {
|
||||||
border: 1px solid #222;
|
border: 1px solid #252525;
|
||||||
border-width: 0 1px 1px 1px;
|
border-width: 0 1px 1px 1px;
|
||||||
padding: 1em 1.25em;
|
padding: 1em 1.25em;
|
||||||
background-color: #333;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -973,7 +973,7 @@
|
||||||
|
|
||||||
if (!e.detail.isRestored) {
|
if (!e.detail.isRestored) {
|
||||||
// Scroll back up so in case vertical scroll was messed with
|
// Scroll back up so in case vertical scroll was messed with
|
||||||
//window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateTitle(page);
|
updateTitle(page);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue