fix: preload room qr codes

dev
gravel 9 months ago
parent 1ad99d30a8
commit b7b8c516bd
No known key found for this signature in database
GPG Key ID: CA95FFF4E0123903

@ -435,18 +435,21 @@ function preloadImages() {
);
const icons = rows.map(
rowElement => rowElement.getAttribute(ATTRIBUTES.ROW.ROOM_ICON)?.split(":")?.[0]
)
);
const qrCodes = rows.map(
rowElement => communityQRCodeURL(rowElement.getAttribute(ATTRIBUTES.ROW.IDENTIFIER))
);
for (const identifier of identifiers) {
const image = new Image();
image.src = communityQRCodeURL(identifier);
preloadedImages.push(image);
}
for (const icon of icons) {
if (!icon) {
for (const url of [...icons, ...qrCodes]) {
if (!url) {
continue;
}
const image = new Image();
image.src = icon;
image.src = url;
preloadedImagesNew.push(image);
}
preloadedImages = preloadedImagesNew;

Loading…
Cancel
Save