set scroll offset when routing to thread
Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
@@ -154,6 +154,7 @@ pub struct Threads {
|
||||
impl Threads {
|
||||
/// Opening a thread.
|
||||
/// Similar to [[super::cache::TimelineCache::open]]
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn open(
|
||||
&mut self,
|
||||
ndb: &mut Ndb,
|
||||
@@ -162,6 +163,7 @@ impl Threads {
|
||||
thread: &ThreadSelection,
|
||||
new_scope: bool,
|
||||
col: usize,
|
||||
scroll_offset: f32,
|
||||
) -> Option<NewThreadNotes> {
|
||||
tracing::info!("Opening thread: {:?}", thread);
|
||||
let local_sub_filter = if let Some(selected) = &thread.selected_note {
|
||||
@@ -191,7 +193,7 @@ impl Threads {
|
||||
RawEntryMut::Vacant(entry) => {
|
||||
let id = NoteId::new(*selected_note_id);
|
||||
|
||||
let node = ThreadNode::new(ParentState::Unknown);
|
||||
let node = ThreadNode::new(ParentState::Unknown).with_offset(scroll_offset);
|
||||
entry.insert(id, node);
|
||||
|
||||
&local_sub_filter
|
||||
|
||||
Reference in New Issue
Block a user