forward filters (ugly)
This commit is contained in:
parent
1f6679f57f
commit
de51666742
8 changed files with 167 additions and 97 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue