Skip to content

Commit

Permalink
fix: fix scroll bug which jumps to start when scrolled up
Browse files Browse the repository at this point in the history
  • Loading branch information
matheuswhite committed Sep 29, 2024
1 parent 5b3e12b commit c6d4a72
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/graphics/graphics_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,10 @@ impl GraphicsTask {
blink_color: Color,
) {
private.last_frame_height = frame.size().height;
let scroll = if private.auto_scroll {
(Self::max_main_axis(&private), private.scroll.1)
} else {
private.scroll
};
if private.auto_scroll {
private.scroll.0 = Self::max_main_axis(&private);
}
let scroll = private.scroll;

let (coll, coll_size) = (
private.history.range(scroll.0 as usize..).filter(|msg| {
Expand Down

0 comments on commit c6d4a72

Please sign in to comment.