Skip to main content

get_visible_weeks

Function get_visible_weeks 

Source
pub fn get_visible_weeks<'a>(
    weeks: &'a [WeekStats],
    state: &TuiState,
    height: usize,
) -> Vec<(&'a WeekStats, bool)>
Expand description

Select the slice of weeks that should be visible, centering on the selected week when possible. Returns pairs of (week, is_selected).