1
//! Inherent intent handling for `ConfigTab`.
2
//!
3
//! Drawing stays on the inherent `draw(frame, area)` in `tabs::config`; this
4
//! block adds `handle` so `ViewMut`'s Config arm dispatches with no trait.
5

            
6
use crate::event::Intent;
7
use crate::tabs::config::ConfigTab;
8
use crate::view::{DrawCtx, Handled};
9

            
10
impl ConfigTab {
11
1
    pub fn handle(&mut self, intent: Intent, _ctx: &DrawCtx) -> Handled {
12
1
        match intent {
13
            Intent::ListSelectNext => {
14
1
                self.select_next();
15
1
                Handled::Consumed(vec![])
16
            }
17
            Intent::ListSelectPrev => {
18
                self.select_prev();
19
                Handled::Consumed(vec![])
20
            }
21
            _ => Handled::Ignored,
22
        }
23
1
    }
24
}