<commit_before>var lightbox = (function () {
var exports = {};

var is_open = false;
// the asset map is a map of all retrieved images and YouTube videos that are
// memoized instead of being looked up multiple times.
var asset_map = {

};

function render_lightbox_list_images(preview_source) {
    if (!is_open) {
        var images = Array.prototype.slice.call($(".focused_table .message_inline_image img"));
        var $image_list = $("#lightbox_overlay .image-list").html("");

        images.forEach(function (img) {
            var src = img.getAttribute("src");
            var className = preview_source.match(src) ? "image selected" : "image";

            var node = $("<div></div>", {
                class: className,
                "data-src": src,
            }).css({ backgroundImage: "url(" + src + ")"});

            $image_list.append(node);
        }, "");
    }
}<commit_msg>lightbox: Fix lightbox not showing new thumbnails as selected.<commit_after>var lightbox = (function () {
var exports = {};

var is_open = false;
// the asset map is a map of all retrieved images and YouTube videos that are
// memoized instead of being looked up multiple times.
var asset_map = {

};

function render_lightbox_list_images(preview_source) {
    if (!is_open) {
        var images = Array.prototype.slice.call($(".focused_table .message_inline_image img"));
        var $image_list = $("#lightbox_overlay .image-list").html("");

        images.forEach(function (img) {
            var src = img.getAttribute("src");
            var className = preview_source === src ? "image selected" : "image";

            var node = $("<div></div>", {
                class: className,
                "data-src": src,
            }).css({ backgroundImage: "url(" + src + ")"});

            $image_list.append(node);
        }, "");
    }
}
{'fraction_non_alphanumeric': 0.1442516268980477, 'fraction_numerical': 0.0, 'mean_word_length': 2.5412667946257197, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5733572', 'n_tokens_mistral': 521, 'n_tokens_neox': 509, 'n_words': 147}