Skip to content
  • Corey Berla's avatar
    view-cell: Prioritize thumbnails on mapped cells · 7dc9b5fb
    Corey Berla authored and António Fernandes's avatar António Fernandes committed
    After the last commit, get_first_visible() file is only used for
    thumbnail prioritization logic. prioritize_thumbnailing_on_idle()
    is very inefficient and over complex as it constantly iterates
    through the bound items to see what is visible.
    
    Instead, let's rely on an GTK implementation detail: list widget
    children outside the scrolled viewport area are not mapped. With
    this assumption, we can connect to ::map in the cells needing a
    thumbnail.
    
    The only catch is that it maps more items initially than are
    visible, so also connect to ::unmap revert the prioritization for
    items that are mapped and immediately unmapped.
    7dc9b5fb