kodo 0.6.2

A CLI tool for analyzing Git commit statistics with TUI visualization
Documentation
use crate::tui::chart_type::ChartType;

/// UI state for MVU update function.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Model {
    pub chart_type: ChartType,
    pub should_quit: bool,
    pub single_metric: bool,
    pub scroll_offset: usize,
    pub data_len: usize,
}

impl Model {
    #[must_use]
    pub fn can_scroll(self) -> bool {
        if self.single_metric {
            matches!(self.chart_type, ChartType::AddDel)
        } else {
            true
        }
    }
}