ublx 0.1.9

TUI to index once, enrich with metadata, and browse a flat snapshot in a 3-pane layout with multiple modes.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Evict right-pane viewer caches when catalog selection changes ([#25]).

use crate::layout::setup::UblxState;
use crate::render::viewers::async_tools;

/// Clear text/async/disk viewer caches and drop image/PDF rasters when the middle-pane row changes.
pub fn evict_viewer_caches_on_selection_change(state: &mut UblxState) {
    state.viewer_text_cache = None;
    state.viewer_preview_source = None;
    state.csv_table_text_lru.clear();
    async_tools::reset_viewer_async(state);
    state.viewer_disk_cache = None;
    state.viewer_image.evict_rasters();
}