QR code preloading

dev
gravel 2 years ago
parent 8216b28f83
commit a8051aa8a3
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -69,6 +69,7 @@ function onLoad() {
markSortableColumns(); markSortableColumns();
addQRModalHandlers(); addQRModalHandlers();
addServerIconInteractions(); addServerIconInteractions();
preloadQRCodes();
} }
function displayQRModal(communityID) { function displayQRModal(communityID) {
@ -170,6 +171,16 @@ function addQRModalHandlers() {
} }
function preloadQRCodes() {
const rows = dom.tbl_communities_content_rows();
const identifiers = rows.map(
rowElement => rowElement.getAttribute(ATTRIBUTES.ROW.IDENTIFIER)
);
for (const identifier of identifiers) {
(new Image()).src = communityQRCodeURL(identifier);
}
}
function createJoinLinkButtons() { function createJoinLinkButtons() {
const join_URLs = dom.join_urls(); const join_URLs = dom.join_urls();
Array.from(join_URLs).forEach((td_url) => { Array.from(join_URLs).forEach((td_url) => {

@ -55,7 +55,7 @@
</div> </div>
<div id="details-modal-end"> <div id="details-modal-end">
<img <img
src="qr-codes/android+118d.png" src=""
id="details-modal-qr-code" id="details-modal-qr-code"
title="Community join link encoded as QR code" title="Community join link encoded as QR code"
> >

Loading…
Cancel
Save