add ThreadNote::set_scroll_offset

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2025-08-04 16:07:39 -04:00
parent ea5c876da6
commit 97d15e41e7

View File

@@ -23,6 +23,7 @@ pub struct ThreadNode {
pub prev: ParentState, pub prev: ParentState,
pub have_all_ancestors: bool, pub have_all_ancestors: bool,
pub list: VirtualList, pub list: VirtualList,
pub set_scroll_offset: Option<f32>,
} }
#[derive(Clone)] #[derive(Clone)]
@@ -132,8 +133,14 @@ impl ThreadNode {
prev: parent, prev: parent,
have_all_ancestors: false, have_all_ancestors: false,
list: VirtualList::new(), list: VirtualList::new(),
set_scroll_offset: None,
} }
} }
pub fn with_offset(mut self, offset: f32) -> Self {
self.set_scroll_offset = Some(offset);
self
}
} }
#[derive(Default)] #[derive(Default)]