forward filters (ugly)

This commit is contained in:
Jana Dönszelmann 2026-02-25 17:14:40 +01:00
parent 1f6679f57f
commit de51666742
No known key found for this signature in database
8 changed files with 167 additions and 97 deletions

View file

@ -1,6 +1,9 @@
use std::sync::Arc;
use crate::tui::{model::LogEntry, processing::LogStream};
use crate::tui::{
model::LogEntry,
processing::{FilterList, LogStream},
};
pub struct LogView {
pub iter: Box<dyn LogStream>,
@ -8,13 +11,13 @@ pub struct LogView {
}
impl LogView {
pub fn selected(&self) -> Option<(Arc<LogEntry>, usize)> {
pub fn selected(&self, fl: &FilterList) -> Option<(Arc<LogEntry>, usize)> {
let mut temp_iter = self.iter.clone();
for _ in 0..self.selection_offset {
let _ = temp_iter.next()?;
let _ = temp_iter.next(fl)?;
}
temp_iter.next()
temp_iter.next(fl)
}
}