mirror of
https://github.com/thelounge/thelounge
synced 2024-11-27 06:20:26 +00:00
c81a74a20c
Fixes #1504
11 lines
378 B
JavaScript
11 lines
378 B
JavaScript
"use strict";
|
|
|
|
const $ = require("jquery");
|
|
const renderPreview = require("../renderPreview");
|
|
const socket = require("../socket");
|
|
const utils = require("../utils");
|
|
|
|
socket.on("msg:preview", function(data) {
|
|
// Previews are not as important, we can wait longer for them to appear
|
|
utils.requestIdleCallback(() => renderPreview(data.preview, $("#msg-" + data.id)), 6000);
|
|
});
|